File tree 1 file changed +10
-4
lines changed
1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -451,10 +451,16 @@ protected function prepareBacktrace($backtrace)
451
451
if (substr ($ val ['function ' ], 0 , 8 ) === 'phpError ' ) {
452
452
break ;
453
453
}
454
- $ path = str_replace ('\\' , '/ ' , $ val ['file ' ]);
455
- if (strpos ($ path , MODX_BASE_PATH ) === 0 ) {
456
- $ path = substr ($ path , strlen (MODX_BASE_PATH ));
454
+
455
+ if (isset ($ val ['file ' ])) {
456
+ $ path = str_replace ('\\' , '/ ' , $ val ['file ' ]);
457
+ if (strpos ($ path , MODX_BASE_PATH ) === 0 ) {
458
+ $ path = substr ($ path , strlen (MODX_BASE_PATH ));
459
+ }
460
+ } else {
461
+ $ path ='' ;
457
462
}
463
+
458
464
switch (get_by_key ($ val , 'type ' )) {
459
465
case '-> ' :
460
466
case ':: ' :
@@ -516,7 +522,7 @@ protected function prepareBacktrace($backtrace)
516
522
'func ' => $ functionName ,
517
523
'args ' => $ args ,
518
524
'path ' => $ path ,
519
- 'line ' => $ val ['line ' ],
525
+ 'line ' => $ val ['line ' ] ?? '' ,
520
526
];
521
527
}
522
528
You can’t perform that action at this time.
0 commit comments