diff options
author | plegall <plg@piwigo.org> | 2006-05-31 21:36:09 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2006-05-31 21:36:09 +0000 |
commit | 7f2fa28c7ac7244a775f9d86534e52183533b14b (patch) | |
tree | f4d98fa3db9bfe0625b0d1a3aa80540848fa3216 /include | |
parent | 59d2febb48fc1a8690d1385c8885433b639e3281 (diff) |
bug 378 fixed: category_id can't be -1 because the field is an unsigned
integer.
git-svn-id: http://piwigo.org/svn/branches/branch-1_5@1330 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include')
-rw-r--r-- | include/functions_user.inc.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php index 8c02f3324..eca9530cf 100644 --- a/include/functions_user.inc.php +++ b/include/functions_user.inc.php @@ -362,7 +362,10 @@ SELECT cat_id // at least, the list contains -1 values. This category does not exists so // where clauses such as "WHERE category_id NOT IN(-1)" will always be // true. - array_push($forbidden_array, '-1'); + if (count($forbidden_array) == 0) + { + array_push($forbidden_array, 0); + } return implode(',', $forbidden_array); } |