Fix: Use safe explode (sexplode) #56
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Error parsing answer:
Warning: Undefined array key 1 in /home/nethouse/wiki/lib/plugins/multiorphan/action/multiorphan.php on line 437
This is a PHP warning, indicating that the
explode()function, when used with '#' as the delimiter on the variable$id, did not find a '#' character. As a result, the resulting array only has one element (index 0), and when you try to access index 1 (i.e.,$hash), it's "undefined.This ensures the array always has a minimum number of elements, filling missing ones with a default value (null by default).