aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2008-12-03 23:27:46 +0000
committerplegall <plg@piwigo.org>2008-12-03 23:27:46 +0000
commitf4f4f9724a480a4336af547c3a0ff814924f0acc (patch)
tree543005844f5b10e023e09807ca1deb629a42f00c /include
parent031276b4c29f84dc7afb2fa770d93d176913d50d (diff)
bug 907 fixed: avoid PHP warning when pwg.images.add adds a photo in a
category that either contains no "ranked" image or when category is empty. git-svn-id: http://piwigo.org/svn/branches/2.0@2921 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/ws_functions.inc.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/ws_functions.inc.php b/include/ws_functions.inc.php
index ce91e7489..d6f032df3 100644
--- a/include/ws_functions.inc.php
+++ b/include/ws_functions.inc.php
@@ -1613,6 +1613,11 @@ SELECT
foreach ($cat_ids as $cat_id)
{
+ if (!isset($current_rank_of[$cat_id]))
+ {
+ $current_rank_of[$cat_id] = 0;
+ }
+
if ('auto' == $rank_on_category[$cat_id])
{
$rank_on_category[$cat_id] = $current_rank_of[$cat_id] + 1;