From b2cdf51cc8a19093fd06142c5a093c9ffab207f7 Mon Sep 17 00:00:00 2001 From: gRoussac Date: Tue, 12 Mar 2013 12:09:47 +0100 Subject: [PATCH] [*] BO : file_put_contents returns length when success not true --- controllers/admin/AdminPerformanceController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/admin/AdminPerformanceController.php b/controllers/admin/AdminPerformanceController.php index be2ff4b25..74ea8d846 100644 --- a/controllers/admin/AdminPerformanceController.php +++ b/controllers/admin/AdminPerformanceController.php @@ -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 ($new_settings == $prev_settings || ( 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); @@ -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 ($new_settings == $prev_settings || ( 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; else