commit changes

This commit is contained in:
2026-03-03 02:29:04 +01:00
parent e61f9fb889
commit c982cf1b51
7 changed files with 13 additions and 33 deletions

View File

@@ -24,11 +24,10 @@ final class Database
} catch (\PDOException $e) {
http_response_code(500);
$env = defined('APP_ENV') ? APP_ENV : 'prod';
$dbDebug = defined('APP_DB_DEBUG') && APP_DB_DEBUG;
$details = 'Database connection error.';
if ($env !== 'prod' || $dbDebug) {
if ($dbDebug) {
$details .= ' ' . $e->getMessage();
}

View File

@@ -216,7 +216,7 @@ final class Search
}));
}
}
if (defined('APP_ENV') && APP_ENV === 'staging') {
if (defined('APP_SEARCH_DEBUG') && APP_SEARCH_DEBUG) {
$logOk = [
'status' => 'ok',
'sql' => $sql,