XML Schema for config value typecasting

More
11 months 2 weeks ago #169458 by Bigred01
I absolutely love the new lime. I have been living with 2.5 for years now and am finally re-writing all of our custom junk for the newest version. I have ran into an issue on php 7.2 for question theme options. readonly_when_active false is a string so its being validated as true and the advanced option inputs are loading disabled once the survey is live. It was an easy fix but made me think that since themes at template or question level all use the xml configs, maybe a schema for setting proper types might be a good idea.

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
More
11 months 1 week ago - 11 months 1 week ago #169694 by DenisChenu
Empty string is false secure.php.net/manual/en/language.types.boolean.php

Then set default value to "" send false, no ?

But more : default is set (or must be set) here : github.com/LimeSurvey/LimeSurvey/blob/36...onAttribute.php#L305

Then : not send it in your xml and you have your false. Send it to 1 or " " return true.

PS : but you're right , a clean schema is something to be done :)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand .
An error happen ? Before make a new topic : remind the Debug mode .
Last edit: 11 months 1 week ago by DenisChenu.

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!