From e4535e892d5e7662c84a6b3c28efa9be84dbdda1 Mon Sep 17 00:00:00 2001 From: Damien Metzger Date: Thu, 13 Jun 2013 10:31:39 +0200 Subject: [PATCH] [-] MO : fixed editorial issue when the entity does not exist yet for a shop #PSCFV-9442 --- modules/editorial/EditorialClass.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/editorial/EditorialClass.php b/modules/editorial/EditorialClass.php index ca0b4db60..5b3d05349 100755 --- a/modules/editorial/EditorialClass.php +++ b/modules/editorial/EditorialClass.php @@ -68,10 +68,7 @@ class EditorialClass extends ObjectModel static public function getByIdShop($id_shop) { $id = Db::getInstance()->getValue('SELECT `id_editorial` FROM `'._DB_PREFIX_.'editorial` WHERE `id_shop` ='.(int)$id_shop); - if ($id) - return new EditorialClass((int)$id); - else - return false; + return new EditorialClass($id); } public function copyFromPost()