79175567

Date: 2024-11-10 19:23:40
Score: 3
Natty:
Report link

I had that error too. With that error it produced also a stack trace:

Fatal error: Uncaught ValueError: strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) in proc.php:963
Stack trace:
#0 proc.php(963): strpos('', '`', -1)
#1 {main}
thrown in proc.php on line 963

As you see it tells that the first argument (a variable in the code) had evaluated to an empty string and the negative offset 1 in that empty string was not allowed. So it looks like you will always have to use a strlen check if this kind of situation can happen.

BTW: strrpos is not a solution. If you replace the above code with "strrpos('', '`', 1)" you get the same error.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Me too answer (2.5): get the same error
  • Low reputation (0.5):
Posted by: user2587656