diff --git a/src/Config.php b/src/Config.php index e853d19..28cedf4 100644 --- a/src/Config.php +++ b/src/Config.php @@ -246,11 +246,13 @@ Class Config { */ public static function ini_set($option, $value) { Log :: trace('Set PHP INI option "%s" to "%s"', $option, $value); - if (ini_set($option, $value) === false) + // ini_set() return the old value in case of success or false in case of error. If option is + // unset, ini_set() will also return false. To detect error, compare set value with value + // retrieve after using ini_get(). + ini_set($option, $value); + $new_value = ini_get($option); + if ($new_value !== $value) Log::warning('Fail to set PHP INI option "%s" to "%s"', $option, $value); - Log :: trace( - 'PHP INI option "%s" after setting it to "%s": "%s"', - $option, $value, vardump(ini_get($option))); } }