isConfigVarChanged(): use intval() too
authorDenis Ovsienko <denis@ovsienko.info>
Wed, 7 Nov 2018 22:23:43 +0000 (22:23 +0000)
committerDenis Ovsienko <denis@ovsienko.info>
Wed, 7 Nov 2018 22:27:18 +0000 (22:27 +0000)
This fixes another PHP warning with PHP 7.1 (see commit 272a945).

A non-numeric value encountered in .../inc/functions.php on line 5536

[skip ci]

wwwroot/inc/functions.php

index 56558c5..10b6343 100644 (file)
@@ -5529,7 +5529,7 @@ function isConfigVarChanged ($varname, $varvalue)
        if (!isset ($configCache[$varname]))
                return TRUE;
        if ($configCache[$varname]['vartype'] == 'uint')
-               return $configCache[$varname]['varvalue'] !== 0 + $varvalue;
+               return $configCache[$varname]['varvalue'] !== intval ($varvalue);
        else
                return $configCache[$varname]['varvalue'] !== $varvalue;
 }