mirror of
https://github.com/php/web-php.git
synced 2026-03-23 23:02:13 +01:00
Ensure we have a statement object, otherwise show a 'service not available' page
This commit is contained in:
@@ -144,7 +144,9 @@ function find_manual_page($lang, $keyword)
|
||||
AND keyword IN (?, ?, ?, ?) ORDER BY keyword = ? DESC, prio LIMIT 1";
|
||||
|
||||
$stm = $dbh->prepare($SQL);
|
||||
$stm->execute(array($lang, $keyword, str_replace(' ', '', $keyword), str_replace(' ', '-', $keyword), str_replace('-', '', $keyword), $keyword));
|
||||
if ($stm) {
|
||||
$stm->execute(array($lang, $keyword, str_replace(' ', '', $keyword), str_replace(' ', '-', $keyword), str_replace('-', '', $keyword), $keyword));
|
||||
}
|
||||
}
|
||||
|
||||
// Successful query
|
||||
|
||||
Reference in New Issue
Block a user