aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2008-12-03 23:29:08 +0000
committerplegall <plg@piwigo.org>2008-12-03 23:29:08 +0000
commit0479bcde106ec3a016c28f2fce458c4b09b1a664 (patch)
tree8b30f38efe269458f120c82f072c1f699681670f /include
parent991ddc9809c5ce5ee1945d9c54353fbfd602ec41 (diff)
merge r2921 from branch 2.0 to trunk
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/trunk@2922 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include')
-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 0993008f1..ed0bbbda1 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;