php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9807 ereg_replace returns "Warning: Invalid content of \{\}"
Submitted: 2001-03-17 10:09 UTC Modified: 2001-04-28 15:42 UTC
From: ppavlovic at mail dot com Assigned:
Status: Closed Package: *Function Specific
PHP Version: 4.0.1 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: ppavlovic at mail dot com
New email:
PHP Version: OS:

 

 [2001-03-17 10:09 UTC] ppavlovic at mail dot com
I also encountered this problem. I called ereg_replace from function such as this:

function replace_var($var, $replacement, $v) 
{ 
return ereg_replace("\{$var\}", htmlspecialchars($replacement), $v); 
}

Call to this function was
$form = replace_var("MODEL", $model, $form); 

$form is piece of HTML, and MODEL is template variable defined in HTML code like {MODEL}

$var is passed to my replace_var function as is.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-03-29 05:54 UTC] stas@php.net
Works for me in 4.0.4. Please re-check with latest version
and if it still happens, please supply values of all
ereg_replace arguments.
 [2001-04-28 15:42 UTC] derick@php.net
Works fine for me too.

If this problem persists with PHP 4.0.5 which
will be released next week, please reopen this report.

Derick
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 02:01:29 2024 UTC