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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC