php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24747 Fatal error: Call to undefined function: stripos()
Submitted: 2003-07-21 21:26 UTC Modified: 2003-07-22 08:06 UTC
From: tagg_maiwald at yahoo dot com Assigned:
Status: Not a bug Package: Strings related
PHP Version: 4.3.2 OS: Win 98
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tagg_maiwald at yahoo dot com
New email:
PHP Version: OS:

 

 [2003-07-21 21:26 UTC] tagg_maiwald at yahoo dot com
Description:
------------
When a string-returning-function or empty string variable is provided as the haystack, PHP reports "Fatal error: Call to undefined function: stripos()".

Reproduce code:
---------------
if ((1>strlen(mysql_error()))&&(stripos(mysql_error(), "duplicate")))
{ echo "is a duplicate record error";
}

Expected result:
----------------
The (stripos(mysql_error(), "duplicate"))) sub-boolean should evaluate to FALSE or some integer.

Actual result:
--------------
Fatal error: Call to undefined function: stripos()

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-21 21:34 UTC] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

stripos is only available in php5.
 [2003-07-22 08:06 UTC] tagg_maiwald at yahoo dot com
The stripos() function, documented as cvs 5.0, works just fine in 4.3.1 and 4.3.2 when the provided haystack is not an empty string.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun May 11 01:01:27 2025 UTC