Skip to content

Commit 07c7eb6

Browse files
committed
commit
1 parent fa8a4da commit 07c7eb6

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

globals/functions.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,11 @@ function dbq($query_string, $params = null)
4242
{
4343
global $app;
4444

45-
$stmt = $app->getContainer()->get('pdo')->prepare($query_string);
46-
$stmt->execute($params);
47-
48-
return $stmt;
49-
}
45+
try {
46+
$stmt = $app->getContainer()->get('pdo')->prepare($query_string);
47+
$stmt->execute($params);
48+
return $stmt;
49+
} catch (\PDOException $e) {
50+
echo $e->getMessage();
51+
}
52+
}

0 commit comments

Comments
 (0)