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
This commit is contained in:
parent
991ddc9809
commit
0479bcde10
1 changed files with 5 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue