php.net |  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
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: shaktidhar at hotmail dot com
New email:
PHP Version: OS:

 

 [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

Patches

Pull Requests

History

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-2025 The PHP Group
All rights reserved.
Last updated: Fri May 09 07:01:28 2025 UTC