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
 [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-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 16:01:31 2024 UTC