1
0
Alex Trofimov 7 жил өмнө
parent
commit
f498d6b471

+ 3 - 0
inc/classes/BxDolAccountQuery.php

@@ -91,6 +91,9 @@ class BxDolAccountQuery extends BxDolDb implements iBxDolSingleton
      */
      */
     public function getIdById($iId, $bClearCache = false)
     public function getIdById($iId, $bClearCache = false)
     {
     {
+        if (!$iId)
+            return false;
+
         $sKey = 'BxDolAccountQuery::getIdById' . $iId;
         $sKey = 'BxDolAccountQuery::getIdById' . $iId;
         if ($bClearCache)
         if ($bClearCache)
             $this->cleanMemory($sKey);
             $this->cleanMemory($sKey);

+ 9 - 0
inc/classes/BxDolProfileQuery.php

@@ -75,6 +75,9 @@ class BxDolProfileQuery extends BxDolDb implements iBxDolSingleton
      */
      */
     public function getProfileByContentAndType ($iContentId, $sType, $bClearCache = false)
     public function getProfileByContentAndType ($iContentId, $sType, $bClearCache = false)
     {
     {
+        if (!$iContentId)
+            return false;
+
         $sKey = 'BxDolProfileQuery::getProfileByContentAndType' . $iContentId . $sType;
         $sKey = 'BxDolProfileQuery::getProfileByContentAndType' . $iContentId . $sType;
         if ($bClearCache)
         if ($bClearCache)
             $this->cleanMemory($sKey);
             $this->cleanMemory($sKey);
@@ -152,6 +155,9 @@ class BxDolProfileQuery extends BxDolDb implements iBxDolSingleton
      */
      */
     public function getCurrentProfileByAccount ($iAccountId, $bClearCache = false)
     public function getCurrentProfileByAccount ($iAccountId, $bClearCache = false)
     {
     {
+        if (!$iAccountId)
+            return false;
+
         $sKey = 'BxDolProfileQuery::getCurrentProfileByAccount' . $iAccountId;
         $sKey = 'BxDolProfileQuery::getCurrentProfileByAccount' . $iAccountId;
         if ($bClearCache)
         if ($bClearCache)
             $this->cleanMemory($sKey);
             $this->cleanMemory($sKey);
@@ -190,6 +196,9 @@ class BxDolProfileQuery extends BxDolDb implements iBxDolSingleton
      */
      */
     public function getIdById($iId, $bClearCache = false)
     public function getIdById($iId, $bClearCache = false)
     {
     {
+        if (!$iId)
+            return false;
+
         $sKey = 'BxDolProfileQuery::getIdById' . $iId;
         $sKey = 'BxDolProfileQuery::getIdById' . $iId;
         if ($bClearCache)
         if ($bClearCache)
             $this->cleanMemory($sKey);
             $this->cleanMemory($sKey);