PHP 8.1 complains about nulls passed to eg strlen #7158
Answered
by
samsonasik
doubledrat
asked this question in
Q&A
-
but rector doesn't seem to have a fix for this? e.g. strlen($string) -> strlen($string ?? '') |
Beta Was this translation helpful? Give feedback.
Answered by
samsonasik
May 11, 2022
Replies: 2 comments
-
it already handled by |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
samsonasik
-
ah. thanks. from the rules overview of NullToStrictStringFuncCallArgRector I thought it was only subbing null for ''! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
it already handled by
NullToStrictStringFuncCallArgRector
, ref https://getrector.org/demo/3258c94a-9879-4a88-8eed-9a1b52ea3e43