[fix] Silence some warnings caused by routine sql query failures.

This commit is contained in:
Solomon Peachy 2021-10-01 08:54:23 -04:00
parent 49f9640450
commit 649ca36f36
2 changed files with 7 additions and 4 deletions

View File

@ -49,6 +49,7 @@ v2.38 (Unreleased)
[fix] Fix printing on remote hosts with newer CUPS
[fix] Respect embedded (and non-sRGB) ICC profiles when printing
[misc] Have next/prev photo links remember display size
[fix] A few warnings triggered by sql query failures
v2.37.1 (December 3, 2012)

View File

@ -135,11 +135,12 @@ case 'photos':
}
$photo_data = get_photo_query($database, array(), $froms, $filter, $offset, $limit, $order);
if ($photo_data === FALSE) break;
for ($cell_counter = 0; $cell_counter < sizeof($photo_data); $cell_counter++) {
$photo = $photo_data[$offset + $cell_counter];
if ($photo == FALSE) break;
if ($photo === FALSE) break;
$photo['caption'] = get_photo_title($photo['caption'], $photo['title'], $photo['original_image_name']);
$item = new FeedItem();
@ -248,12 +249,13 @@ case 'folder':
limit $limit");
$search_result = pg_fetch_all($search_result);
if ($search_result === FALSE) break;
$args = array();
for ($i = 0 ; $i < sizeof($search_result); $i++) {
$row = $search_result[$offset + $i];
if ($row == FALSE) break;
if ($row === FALSE) break;
$item = new FeedItem();
$item->title = $row['caption'];