[*] BO : file_put_contents returns length when success not true
This commit is contained in:
@@ -705,7 +705,7 @@ class AdminPerformanceControllerCore extends AdminController
|
|||||||
// If there is not settings file modification or if the backup and replacement of the settings file worked
|
// If there is not settings file modification or if the backup and replacement of the settings file worked
|
||||||
if ($new_settings == $prev_settings || (
|
if ($new_settings == $prev_settings || (
|
||||||
copy(dirname(__FILE__).'/../../config/settings.inc.php', dirname(__FILE__).'/../../config/settings.old.php')
|
copy(dirname(__FILE__).'/../../config/settings.inc.php', dirname(__FILE__).'/../../config/settings.old.php')
|
||||||
&& file_put_contents(dirname(__FILE__).'/../../config/settings.inc.php', $new_settings)
|
&& (bool)file_put_contents(dirname(__FILE__).'/../../config/settings.inc.php', $new_settings)
|
||||||
))
|
))
|
||||||
{
|
{
|
||||||
Configuration::updateValue('PS_CIPHER_ALGORITHM', $algo);
|
Configuration::updateValue('PS_CIPHER_ALGORITHM', $algo);
|
||||||
@@ -774,7 +774,7 @@ class AdminPerformanceControllerCore extends AdminController
|
|||||||
// If there is not settings file modification or if the backup and replacement of the settings file worked
|
// If there is not settings file modification or if the backup and replacement of the settings file worked
|
||||||
if ($new_settings == $prev_settings || (
|
if ($new_settings == $prev_settings || (
|
||||||
copy(dirname(__FILE__).'/../../config/settings.inc.php', dirname(__FILE__).'/../../config/settings.old.php')
|
copy(dirname(__FILE__).'/../../config/settings.inc.php', dirname(__FILE__).'/../../config/settings.old.php')
|
||||||
&& file_put_contents(dirname(__FILE__).'/../../config/settings.inc.php', $new_settings)
|
&& (bool)file_put_contents(dirname(__FILE__).'/../../config/settings.inc.php', $new_settings)
|
||||||
))
|
))
|
||||||
$redirectAdmin = true;
|
$redirectAdmin = true;
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user