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
Per discussion in #4, re: resolution of #2 — We should only be passing $userdata downstream to the target callable if our user actually provides an argument. However, a simple boolean check is insufficient here, because the intended argument could be non-null but still falsy. We should replace the current check with isset().
The text was updated successfully, but these errors were encountered:
Looking further into this... My original intent was was that the signature for craftArrayWalk would match the native array_walk, which appears (in the docs, at least) to also provide a default null value if no $userdata argument is passed.
So, I'm not sure if adding an additional check in our method would actually make any difference. 🤔
@jalendport, did you test the case in #2 to see whether excluding that param allows the walk to run without error? If so, it means PHP's array_walk isn't normalizing the optional param, but actually excluding it, and we could do the same. If excluding the param from our call to array_walk doesn't actually make a difference, this would be a #wontfix. (or more accurately, a #cantfix.)
Per discussion in #4, re: resolution of #2 — We should only be passing
$userdata
downstream to the target callable if our user actually provides an argument. However, a simple boolean check is insufficient here, because the intended argument could be non-null but still falsy. We should replace the current check withisset()
.The text was updated successfully, but these errors were encountered: