XML Schema for config value typecasting

More
3 months 3 weeks ago #169458 by Bigred01
Bigred01 created the topic: XML Schema for config value typecasting
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.

More
3 months 1 week ago - 3 months 1 week ago #169694 by DenisChenu
DenisChenu replied the topic: XML Schema for config value typecasting
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 (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Last Edit: 3 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!