From 6291b3ed76b0a0112f74e4e6d188050d62373066 Mon Sep 17 00:00:00 2001 From: Olivier Berten Date: Sat, 10 Aug 2013 16:54:23 +0100 Subject: [PATCH] Fix bug when page number isn't in the image list --- chant.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/chant.php b/chant.php index 6ab3317..70e2a7b 100644 --- a/chant.php +++ b/chant.php @@ -33,7 +33,11 @@ while ($s = $req1->fetch_assoc()) { } else { $p = $s['page']; } - $c_p[] = array($s['source'], $s['page'], $p, intval($s['extent']), intval($s['sequence'])); + if($p) { + $c_p[] = array($s['source'], $s['page'], $p, intval($s['extent']), intval($s['sequence'])); + } else { + $c_p[] = $c_s; + } } else { $c_p[] = $c_s; }