Commit 60b476d17141d5fd88eeeec88968ce7e902cee8c

Authored by Neil Blakey-Milner
1 parent 07fec476

If we have no parameters in our array, return an empty string.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4263 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 3 additions and 0 deletions
lib/database/dbutil.inc
... ... @@ -222,6 +222,9 @@ class DBUtil {
222 222  
223 223 function &paramArray($aArray) {
224 224 $iNumIds = count($aArray);
  225 + if (empty($iNumIds)) {
  226 + return "";
  227 + }
225 228 return join(",", array_fill(0, $iNumIds, '?'));
226 229 }
227 230  
... ...