Edit report at https://pear.php.net/bugs/bug.php?id=20956&edit=1

  ID: 20956
  Comment by: ale.comp_06@xox.ch
  Reported By: roxanne@moretoit.net
  Summary: preg_replace(): The /e modifier is deprecated
  Status: Open
  Type: Bug
  Package: HTML_Template_IT
  Operating System: linux
  Package Version: 1.3.0
  PHP Version: 5.5.29
  Roadmap Versions:
  New Comment:

well, of course it should have been:

< return preg_replace(
< "#<!-- INCLUDE (.*) -->#ime",
< "\$this->getFile('\\1')",
return preg_replace_callback(
"#<!-- INCLUDE (.*) -->#im",
create_function('$matches', 'return

(< & > above arejust the wrong way round...)

Previous Comments:

[2016-02-08 05:44:28] ale

i don't get the error at the same line, but here is a patch that solves
the issues for the preg_replace with callback in the getFile() method:

< return preg_replace_callback(
< "#<!-- INCLUDE (.*) -->#im",
< create_function('$matches', 'return
return preg_replace(
"#<!-- INCLUDE (.*) -->#ime",
using a real anonymous function would of course be even betterer, but
i'm not sure what is the php compatibility level of the module is..


[2015-10-01 02:16:48] gregorycu

A work-around for this is to disable deprecation warnings.


[2015-10-01 01:27:49] roxswan

I have an app that has been running just fine for a few years and this
week it throws the following error on the home/login page:

/home/howtoit0/PEAR/HTML/Template/IT.php (2189)
preg_replace(): The /e modifier is deprecated, use preg_replace_callback

My hosting provider did just upgrade MySQL from the version tree 5.5 to
version 5.6 as well as the Apache to 2.4 Version and the PHP releases to

I have run all PEAR updates but the problem persists.

Test script:
You can see this error in action at

Expected result:
The page should show a login box on the left side panel and text in the
main panel.

Actual result:
At the moment, the login box does not display and the error message
listed in the previous description displays instead of the usual text.


Search Discussions

Discussion Posts


Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 2 | next ›
Discussion Overview
grouppear-bugs @
postedFeb 8, '16 at 10:44a
activeFeb 8, '16 at 10:46a

1 user in discussion

Ale Comp_06: 2 posts



site design / logo © 2022 Grokbase