Cast attr to string to prevent a PHP deprecation warning in 8.1#365
Cast attr to string to prevent a PHP deprecation warning in 8.1#365michelf merged 2 commits intomichelf:libfrom
Conversation
|
@michelf Would this be a reasonable fix? I get this warning all over the place, too 😅 |
|
It works. But there's a fast path at the beginning of the function: I think it'd make more sense to check for |
|
So instead of You're thinking of something like: ... or is there a simpler implementation that would provide the desired logic? |
|
Ah, I was wrong here. So I think the best fix would be to change |
I received this Deprecation notice when running unit tests for
sculpinunder PHP 8.1:I solved it in the leanest way possible, which was to cast
$attrtostring. Let me know if you would prefer a different solution.And thanks for building this library! I've been quite happy with it.