Skip to content

Bug fix (#20): Fatal error: Uncaught TypeError: Argument 1 must be of the type array, null given#25

Open
AN0R31 wants to merge 1 commit intoitrack:masterfrom
AN0R31:bug_#20_fix
Open

Bug fix (#20): Fatal error: Uncaught TypeError: Argument 1 must be of the type array, null given#25
AN0R31 wants to merge 1 commit intoitrack:masterfrom
AN0R31:bug_#20_fix

Conversation

@AN0R31
Copy link

@AN0R31 AN0R31 commented Jul 2, 2024

If no results are returned from the CIF search, $results will be null, but calling Client->first() method will try to access $results[0], which will throw the given error. By checking if any results are found, the issue is safely avoided.

…, but calling Client->first() method will try to access $results[0], which will throw the given error. By checking if any results are found, the issue is safely avoided.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant