Edit report at https://bugs.php.net/bug.php?id=80336&edit=1
ID: 80336
User updated by: info at backups dot nl
Reported by: info at backups dot nl
Summary: Fatal error: Uncaught ValueError: strrpos():
Argument #3 ($offset) must be con
-Status: Feedback
+Status: Assigned
Type: Bug
Package: Testing related
Operating System: Ubunutom 20.04
PHP Version: 8.0.0RC3
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
i will add a check to test the value of $url being empty.
Thanks for the hint.
Previous Comments:
------------------------------------------------------------------------
[2020-11-08 13:26:56] [email protected]
Are you absolutely sure that $url contains a non-empty value?
See <https://3v4l.org/YXmj3>.
------------------------------------------------------------------------
[2020-11-08 12:56:01] info at backups dot nl
Description:
------------
Hi
I get this fatal error in php 8.0 rc3
Fatal Uncaught ValueError: strrpos(): Argument #3 ($offset) must be contained
in argument #1
Why do i get this error on this code. It is exactly as the php documentation
describes to use it.
$pos = strrpos($url, '.', -1);
Please advice.
Test script:
---------------
$url='https://myserver.com';
$pos = strrpos($url, '.', -1);
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80336&edit=1