diff --git a/src/Dev/Deprecation.php b/src/Dev/Deprecation.php index dd96d4b15..5ab56ce5d 100644 --- a/src/Dev/Deprecation.php +++ b/src/Dev/Deprecation.php @@ -126,13 +126,12 @@ class Deprecation if (!$level) { $level = 1; } - $called = $backtrace[$level]; + $called = $backtrace ? $backtrace[$level] : []; if (isset($called['class'])) { return $called['class'] . $called['type'] . $called['function']; - } else { - return $called['function']; } + return $called['function'] ?? ''; } /**