|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1445 It's giving a warning
Submitted: 1999-05-24 02:14 UTC Modified: 1999-05-24 03:13 UTC
From: shaktidhar at hotmail dot com Assigned:
Status: Closed Package: Compile Warning
PHP Version: 3.0.8 OS: LINUX
Private report: No CVE-ID: None
 [1999-05-24 02:14 UTC] shaktidhar at hotmail dot com
the following script give the error 
"Warning: REG_BADRPT in ./init.php3 on line 83" . 

 if (!strstr($pattern,"+")) {
	$nd = "OR" ;
	echo "$pattern" ;
	else {
	echo "$pattern" ; 
	$nd  = "AND" ;
	echo "$pattern" ;
	$pattern = eregi_replace("+"," ",$pattern) ;
	echo "$pattern" ;


please see


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [1999-05-24 03:13 UTC] rasmus at cvs dot php dot net
The + character is a special regex char and as such the regex you are 
feeding in there makes absolutely no sense.  And to make it even stranger,
you toss in a the case insensitive version of the function.  What does an 
upper case + look like?  Use str_replace() instead.  The error PHP is throwing
at you is absolutely valid.
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Aug 11 01:01:25 2020 UTC