Update picture.php

Fix a bug as outlined in Issue #1821
This commit is contained in:
AJ Quick 2022-12-12 23:12:33 -07:00 committed by GitHub
parent be63364aa6
commit 7cc18dded4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,7 +30,7 @@ if ( !isset($page['rank_of'][$page['image_id']]) )
SELECT id, file, level
FROM '.IMAGES_TABLE.'
WHERE ';
if ($page['image_id']>0)
if (is_int($page['image_id']))
{
$query .= 'id = '.$page['image_id'];
}
@ -1044,4 +1044,4 @@ else
//------------------------------------------------------------ log informations
pwg_log($picture['current']['id'], 'picture');
include(PHPWG_ROOT_PATH.'include/page_tail.php');
?>
?>