sdfdsf
This commit is contained in:
@@ -90,7 +90,17 @@ final class Search
|
|||||||
$stmt = $this->pdo->prepare($sql);
|
$stmt = $this->pdo->prepare($sql);
|
||||||
try {
|
try {
|
||||||
$stmt->execute($bind);
|
$stmt->execute($bind);
|
||||||
return $stmt->fetchAll(\PDO::FETCH_ASSOC) ?: [];
|
$rows = $stmt->fetchAll(\PDO::FETCH_ASSOC) ?: [];
|
||||||
|
if (defined('APP_ENV') && APP_ENV === 'staging') {
|
||||||
|
$logOk = [
|
||||||
|
'status' => 'ok',
|
||||||
|
'sql' => $sql,
|
||||||
|
'bind' => $bind,
|
||||||
|
'count' => count($rows),
|
||||||
|
];
|
||||||
|
@file_put_contents(__DIR__ . '/../../debug/search_debug.log', print_r($logOk, true));
|
||||||
|
}
|
||||||
|
return $rows;
|
||||||
} catch (\PDOException $e) {
|
} catch (\PDOException $e) {
|
||||||
// Log into /debug/search_debug.log and continue with empty results
|
// Log into /debug/search_debug.log and continue with empty results
|
||||||
$logErr = [
|
$logErr = [
|
||||||
|
|||||||
Reference in New Issue
Block a user