Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Check whether `$arrParentIds` is empty in `Controller::getChildRecord…

…s()`
  • Loading branch information...
commit 515cce9f33e19926704c3fe51a96feea75be4226 1 parent 3d43c11
@leofeyer leofeyer authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 system/libraries/Controller.php
View
5 system/libraries/Controller.php
@@ -3090,6 +3090,11 @@ protected function getChildRecords($arrParentIds, $strTable, $blnSorting=false,
$arrParentIds = array($arrParentIds);
}
+ if (empty($arrParentIds))
+ {
+ return $arrReturn;
+ }
+
$arrParentIds = array_map('intval', $arrParentIds);
$objChilds = $this->Database->execute("SELECT id, pid FROM " . $strTable . " WHERE pid IN(" . implode(',', $arrParentIds) . ")" . ($blnSorting ? " ORDER BY " . $this->Database->findInSet('pid', $arrParentIds) . ", sorting" : ""));
Please sign in to comment.
Something went wrong with that request. Please try again.