php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9416 ereg_replace returns "Warning: Invalid content of \{\}"
Submitted: 2001-02-22 21:08 UTC Modified: 2001-04-10 10:08 UTC
From: bugs at sels dot com Assigned:
Status: Closed Package: Regexps related
PHP Version: 4.0.4pl1 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: bugs at sels dot com
New email:
PHP Version: OS:

 

 [2001-02-22 21:08 UTC] bugs at sels dot com
i have that odd message if i call up ereg_replace on a big string,(small html page from post).
i made an grep on the php source, and i did not find it ...?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-03-08 10:12 UTC] stas@php.net
Could you please provide an example of the string where it
happens?

Also, could you post a ereg call you are using?
 [2001-04-10 10:08 UTC] sniper@php.net
No feedback. If this happens also with soon to be released 
PHP 4.0.5, reopen this bug report with a short example 
script which can be used to reproduce this.

--Jani

 [2002-02-05 23:03 UTC] giovanni at wup dot it
Hi, i am running 4.0.6 freshly installed from redhat 7.2 i believe this bug is still alive an whell

from PhormJr.php (which user to work just fine.)

....
**** $ph_tkln = ereg("{{[A-z0-9_]*}}", $ph_tline, $ph_tkn);
      while ($ph_tkln) {
        $ph_sub = substr($ph_tkn[0], 2, $ph_tkln-4);
        $$ph_sub = ereg_replace("{{", ":{:{", $$ph_sub);
        $ph_tline = ereg_replace($ph_tkn[0], $$ph_sub, $ph_tline);
        $ph_tkln = ereg("{{[A-z0-9_]*}}", $ph_tline, $ph_tkn);
      } // ($ph_tkln)
***  $ph_tline = ereg_replace(":{:{", "{{", $ph_tline);
....

I get an error at the line marked by ***
Warning: Invalid content of \{\} in /var/www/html/forms/phormjr.php3


putting slashes in front of it doesnt really work like:
$ph_tkln = ereg("\\{\\{[A-z0-9_]*\\}\\}", $ph_tline, $ph_tkn);
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Nov 15 09:01:35 2019 UTC