You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported by donnerhacke on 20 Jun 2013 12:09 UTC as Trac ticket #1489189
iniset.php compares the ini_get results directly to stored numbers.
foreach ($crit_opts as $optname => $optval) {
if ($optval != ini_get($optname)) {
ini_get is documented to return "0 or the empty string" or "1" for boolean values. But it is (in the meantime) also allowed to return the real configuration string "On", "off", "True", "false", "Yes", "no" ...
So the correct code needs to use filter_val explicitly
foreach ($crit_opts as $optname => $optval) {
if (filter_var($optval,FILTER_VALIDATE_BOOLEAN)
!==
filter_var(ini_get($optname),FILTER_VALIDATE_BOOLEAN)) {
Please to no add FILTER_NULL_ON_FAILURE, because a missing value (i.e. module does not exists) can be safely considered as "false".
Reported by donnerhacke on 20 Jun 2013 12:09 UTC as Trac ticket #1489189
iniset.php compares the ini_get results directly to stored numbers.
ini_get is documented to return "0 or the empty string" or "1" for boolean values. But it is (in the meantime) also allowed to return the real configuration string "On", "off", "True", "false", "Yes", "no" ...
So the correct code needs to use filter_val explicitly
Please to no add FILTER_NULL_ON_FAILURE, because a missing value (i.e. module does not exists) can be safely considered as "false".
Migrated-From: http://trac.roundcube.net/ticket/1489189
The text was updated successfully, but these errors were encountered: