php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4353 ereg_replace does not work with { or } in FastTemplate implementation
Submitted: 2000-05-09 00:34 UTC Modified: 2000-05-10 02:07 UTC
From: ravage at k2ia dot com Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 4.0 Release Candidate 1 OS: Windows NT
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: ravage at k2ia dot com
New email:
PHP Version: OS:

 

 [2000-05-09 00:34 UTC] ravage at k2ia dot com
Just try the example files that come with FastTemplate for PHP

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-05-09 00:37 UTC] ravage at k2ia dot com
Was able to remedy by editing the ereg_replace statement as follows.

From
$template = ereg_replace("{$key}","$val","$template");
to
$template = ereg_replace("\{$key\}","$val","$template");

Essentially added the backslash ('\') to the curly braces. 

 [2000-05-09 16:42 UTC] andrei at cvs dot php dot net
That's FastTemplate's problem, not PHP's.
 [2000-05-10 02:07 UTC] ravage at k2ia dot com
Just thought that since it worked fine with PHP version 3 that it should work properly with version 4. I guess somebody should tell the FastTemplate guys of the changes in behavior with PHP4 so that it could be reflected in the distribution package.

Take note all ye FastTemplate users who might upgrade from PHP3 to PHP4.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 01 07:01:30 2024 UTC