Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 80b03f9

Browse filesBrowse files
ornicarfabpot
authored andcommitted
[HttpKernel] Throw exception when SQLite statement execution failed
This fixes SQLiteProfilerStorageTest, that was failing using PDO.
1 parent 743f25a commit 80b03f9
Copy full SHA for 80b03f9

File tree

Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed

‎src/Symfony/Component/HttpKernel/Profiler/SQLiteProfilerStorage.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/Profiler/SQLiteProfilerStorage.php
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,10 @@ protected function exec($db, $query, array $args = array())
157157
foreach ($args as $arg => $val) {
158158
$stmt->bindValue($arg, $val, is_int($val) ? \PDO::PARAM_INT : \PDO::PARAM_STR);
159159
}
160-
$stmt->execute();
160+
$success = $stmt->execute();
161+
if (!$success) {
162+
throw new \RuntimeException(sprintf('Error executing SQLite query "%s"', $query));
163+
}
161164
}
162165
}
163166

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.