From 2c781997d1832bc2c3cd781ab4fc2c5059588d21 Mon Sep 17 00:00:00 2001 From: mDeflotte Date: Wed, 30 May 2012 12:59:33 +0000 Subject: [PATCH] // Fixed warning display on p15012_add_missing_columns git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15763 b9a71923-0436-4b27-9f14-aed3839534dd --- .../upgrade/php/p15012_add_missing_columns.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/install-dev/upgrade/php/p15012_add_missing_columns.php b/install-dev/upgrade/php/p15012_add_missing_columns.php index 9761dcafb..332a2df23 100644 --- a/install-dev/upgrade/php/p15012_add_missing_columns.php +++ b/install-dev/upgrade/php/p15012_add_missing_columns.php @@ -28,7 +28,6 @@ function p15012_add_missing_columns() { $errors = array(); - $res = true; $db = Db::getInstance(); $q_list = array(); // columns must exists @@ -172,7 +171,7 @@ function p15012_add_missing_columns() else $do = 'add'; - if(!empty($q[$do])) + if (!empty($q[$do])) { if (!$db->execute($q[$do])) $errors[] = $db->getMsgError(); @@ -180,12 +179,11 @@ function p15012_add_missing_columns() } } - if(!$res) + if (sizeof($errors) > 0) + { $msg = implode('
', $errors); - else - $msg = ''; - if (!$res) - return array('error' => $res, 'msg' => $msg); + return array('error' => 1, 'msg' => $msg); + } else return true; }