1
0
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:
Hannes Magnusson
2011-07-06 14:15:01 +00:00
parent 4d9ce0bfa6
commit c8187bdce3

View File

@@ -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