-
-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Function preg_match not working properly #26
Comments
Give this a shot here:
|
Well, that was simple. Thank you! However I don't know if the package should change the behavior of the original method (even though it was a bit magic)? |
Sure thing, glad I could help! I haven't tested it myself - yet - however I think it may be a behavior that's unavoidable when shimming this type of function. I'll test it for real and then report back. |
So after a bit of testing I found out that you're correct in that this change in behavior could be avoided. I'm not sure how that would be done since I'm not familiar with the generation of the shims - but changing the behavior here should be avoidable for sure. Essentially just turning the last |
Hoooo I see... Thanks @WillyReyno and @mallardduck for pointing this out. Just reproduced the error in a unit test. The issue arises with all functions that have optional "by reference" arguments. I'm trying to implement @mallardduck fix in the code generator right now. |
....aaaaand it's fixed! :) Thanks to all of you! |
Method preg_match doesn't seem to be working properly after installing Safe.
I made a regex to split spotify URL and retrieve the id. Here is my code which is working when I remove Safe's use function :
For the url
https://open.spotify.com/track/0nCqpKBrvDchO1BIvt7DTR?si=iLUKDfkLSy-IpnLA7qImnw
the return of $matches[1] should be0YCRJcAXQ3NSfKN1x1IXK3
.With Safe, $matches returns null.
Thank you for the awesome lib :)
The text was updated successfully, but these errors were encountered: