File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed
Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,12 @@ protected function toImmMap(\Exception $e): ExceptionImmMap {
5959 ' line' => $e -> getLine(),
6060 ' trace' => map (
6161 $e -> getTrace(),
62- $v ==> (new Map ($v ))-> removeKey(' args' )-> toArray(),
62+ $v ==> {
63+ if (is_array ($v )) {
64+ return (new Map ($v ))-> removeKey(' args' )-> toArray();
65+ }
66+ return [];
67+ }
6368 ),
6469 ],
6570 );
Original file line number Diff line number Diff line change 1- < ?hh
1+ < ?hh // decl
22
33namespace NazgTest\Action ;
44
Original file line number Diff line number Diff line change @@ -35,6 +35,10 @@ public function testFunctionalExceptionRegister(): void {
3535 $d = json_decode ($r -> getBody()-> getContents(), true );
3636 expect ($d [' message' ])-> toBeSame(' Exception for testing' );
3737 expect ($r -> getStatusCode())-> toBeSame(500 );
38+ $this -> assertArrayHasKey(' exception' , $d );
39+ $this -> assertArrayHasKey(' file' , $d );
40+ $this -> assertArrayHasKey(' line' , $d );
41+ $this -> assertArrayHasKey(' trace' , $d );
3842 }
3943 }
4044}
You can’t perform that action at this time.
0 commit comments