diff --git a/core/lib/Drupal/Core/Database/Log.php b/core/lib/Drupal/Core/Database/Log.php
index 5d5d560..bd33fc4 100644
--- a/core/lib/Drupal/Core/Database/Log.php
+++ b/core/lib/Drupal/Core/Database/Log.php
@@ -155,6 +155,7 @@ class Log {
         $stack[$i]['class'] = '';
       }
       if (strpos($stack[$i]['class'], __NAMESPACE__) === FALSE && strpos($stack[$i + 1]['function'], 'db_') === FALSE) {
+        $stack[$i] += array('file' => '?', 'line' => '?', 'args' => array());
         return array(
           'file' => $stack[$i]['file'],
           'line' => $stack[$i]['line'],
