diff --git a/src/Symfony/Component/HttpKernel/Profiler/SQLiteProfilerStorage.php b/src/Symfony/Component/HttpKernel/Profiler/SQLiteProfilerStorage.php index f82ecec163..fc090d3904 100644 --- a/src/Symfony/Component/HttpKernel/Profiler/SQLiteProfilerStorage.php +++ b/src/Symfony/Component/HttpKernel/Profiler/SQLiteProfilerStorage.php @@ -146,6 +146,11 @@ class SQLiteProfilerStorage implements ProfilerStorageInterface protected function exec($db, $query, array $args = array()) { $stmt = $db->prepare($query); + + if (false === $stmt) { + throw new \RuntimeException('The database cannot successfully prepare the statement'); + } + if ($db instanceof \SQLite3) { foreach ($args as $arg => $val) { $stmt->bindValue($arg, $val, is_int($val) ? \SQLITE3_INTEGER : \SQLITE3_TEXT);