Skip to content

Commit d18598f

Browse files
committed
Added comment to describe if statement on createHere
1 parent 2db0730 commit d18598f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Model/SourceLocation.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ public function __construct($message, $path, $line, array $context = [])
6363
public static function createHere($message, array $context = [])
6464
{
6565
foreach (debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, 2) as $trace) {
66+
// File is not set if we call from an anonymous context like an array_map function.
6667
if (isset($trace['file'])) {
6768
break;
6869
}

0 commit comments

Comments
 (0)