Fix funny comparison features of php between numbers and strings. See https://www.php.net/manual/language.operators.comparison.php
This commit is contained in:
parent
539d0d38b6
commit
2b62b57db3
|
|
@ -4,7 +4,9 @@ $sources = array();
|
|||
$sql1 = 'SELECT * FROM '.db('sources').' ORDER BY year,editor,title';
|
||||
$req1 = $mysqli->query($sql1) or die('Erreur SQL !<br />'.$sql1.'<br />'.$mysqli->error);
|
||||
while ($s = $req1->fetch_assoc()) {
|
||||
$sources[$s['id']] = array('year' => $s['year'], 'editor' => $s['editor'], 'title' => $s['title'], 'description' => $s['description'], 'caption' => $s['caption'], 'pages' => json_decode($s['pages']));
|
||||
$pages = json_decode($s['pages']);
|
||||
if($pages) $pages = array_map('strval', $pages);
|
||||
$sources[$s['id']] = array('year' => $s['year'], 'editor' => $s['editor'], 'title' => $s['title'], 'description' => $s['description'], 'caption' => $s['caption'], 'pages' => $pages);
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue