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 }}
Repository navigation
hDel behaviour change between 6.1.0 and 6.2.0 #2650
We started getting fatal errors in our app when we upgraded from 6.1.0 to 6.2.0 with the error:
Redis::hDel() expects at least 2 arguments, 1 given
It turns out there was a bug in our code which could result in hDel being called with only 1 argument. It was easily fixed by checking $keys wasn't empty before calling hDel().
Just thought I'd raise it here as a behaviour change in a minor version release as it doesn't seem to be noted in the changelog, and could impact others.
I'm assuming it was this change that made it more strict:
It's also interesting because 6.1.0's stub was already reqiring at least two arguments. I would have expected 6.1.0 to throw a fatal error as well.
I think it could be argued that the 6.1.0 behavior was a bug, given the stub. Either way, these kinds of edge cases should be much rarer with PHP's new argument parsing macros.
Activity
michael-grunder commentedon Apr 13, 2025
Thanks, definitely useful to know.
It's also interesting because
6.1.0's stub was already reqiring at least two arguments. I would have expected 6.1.0 to throw a fatal error as well.I think it could be argued that the 6.1.0 behavior was a bug, given the stub. Either way, these kinds of edge cases should be much rarer with PHP's new argument parsing macros.