diff options
Diffstat (limited to 'include/ws_functions.inc.php')
-rw-r--r-- | include/ws_functions.inc.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/ws_functions.inc.php b/include/ws_functions.inc.php index 28319ab10..cf6796d9d 100644 --- a/include/ws_functions.inc.php +++ b/include/ws_functions.inc.php @@ -205,6 +205,12 @@ function ws_getMissingDerivatives($params, &$service) } list($max_id, $image_count) = pwg_db_fetch_row( pwg_query('SELECT MAX(id)+1, COUNT(*) FROM '.IMAGES_TABLE) ); + + if (0 == $image_count) + { + return array(); + } + $start_id = intval($params['prev_page']); if ($start_id<=0) { |