diff --git a/core/includes/errors.inc b/core/includes/errors.inc
index 5fc4b7d..469319a 100644
--- a/core/includes/errors.inc
+++ b/core/includes/errors.inc
@@ -304,6 +304,14 @@ function _drupal_get_last_caller(&$backtrace) {
     array_shift($backtrace);
   }
 
+  if (empty($backtrace)) {
+    return array(
+      'function' => 'unknown',
+      'file' => 'unknown',
+      'line' => 0,
+    );
+  }
+
   // The first trace is the call itself.
   // It gives us the line and the file of the last call.
   $call = $backtrace[0];
