-
Notifications
You must be signed in to change notification settings - Fork 462
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NonexistentOffsetInArrayDimFetchRule - do not report errors on expres…
…sions after truthy `isset` check
- Loading branch information
1 parent
b73602e
commit 6fbd6e4
Showing
3 changed files
with
30 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
namespace Bug9991; | ||
|
||
function (): void { | ||
$data = json_decode(file_get_contents('') ?: '', flags: JSON_THROW_ON_ERROR | JSON_OBJECT_AS_ARRAY); | ||
|
||
if ( | ||
isset($data['title']) | ||
&& is_string($data['title']) | ||
) { | ||
echo $data['title']; | ||
} | ||
}; |