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 Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
28 - 25 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Add a Pull Request

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 Apr 18 00:01:28 2024 UTC