From: Gusa Date: Sat, 15 Dec 2012 02:54:17 +0000 (+0100) Subject: Fixed error: finding ads but not user association. X-Git-Url: https://git.gumartinm.name/?a=commitdiff_plain;h=ce12405c36beb40b959d55fad7b5a8344b299d68;p=mobi%2F.git Fixed error: finding ads but not user association. --- diff --git a/lib/model/doctrine/AdDescriptionTable.class.php b/lib/model/doctrine/AdDescriptionTable.class.php index d21111c..eaa69cb 100644 --- a/lib/model/doctrine/AdDescriptionTable.class.php +++ b/lib/model/doctrine/AdDescriptionTable.class.php @@ -102,7 +102,7 @@ class AdDescriptionTable extends Doctrine_Table { try { - $adIds[] = Doctrine_Manager::getInstance()->getCurrentConnection()->fetchOne( + $auxAdId = Doctrine_Manager::getInstance()->getCurrentConnection()->fetchOne( "SELECT ad.id FROM ad INNER JOIN company_category ON (ad.company_categ_id=company_category.id) INNER JOIN general_category ON (company_category.general_categ_id=general_category.id) INNER JOIN user_basket ON (user_basket.general_categ_id=general_category.id) @@ -114,6 +114,11 @@ class AdDescriptionTable extends Doctrine_Table //In case of error return as soon as posible. return null; } + + if (!empty($auxAdId)) + { + $adIds[] = $auxAdId; + } } if (empty($adIds)) {