You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 31, 2020. It is now read-only.
In Zend\Form\View\Helper\FormSelectArrayUtils::inArray is called with the strict parameter false. This causes an issue with string matching ('1.1' and '1.10' treated equivalent):
<?php$needle = '1.10';
$haystack = ['1.1'];
assert(in_array($needle, $haystack) === false);
// PHP Warning: assert(): Assertion failed in <file> on line 5
Since ArrayUtils::inArray uses string casting to work around in_array's wonky non-strict behaviour, shouldn't the call to in_array always have strict=true?
I've tested this change here (all tests pass) and against zend-form (where it fixes the reported issue).
What's the protocol for testing changes to packages which may have knock-on effects on other packages? Pull every repo that has a dependency on stdlib, apply the patch, and run the tests?