FAQ
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:

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:

1091,1093c1091,1093
< return preg_replace_callback(
< "#<!-- INCLUDE (.*) -->#im",
< create_function('$matches', 'return
$this->getFile($matches[1]);'),
---
return preg_replace(
"#<!-- INCLUDE (.*) -->#ime",
"\$this->getFile('\\1')",
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..


Previous Comments:
------------------------------------------------------------------------

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

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

------------------------------------------------------------------------

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

Description:
------------
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
instead

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
5.5

I have run all PEAR updates but the problem persists.

Test script:
---------------
You can see this error in action at
http://moretoit.net/practicemonitor/


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

  • Ale Comp_06 at Feb 8, 2016 at 10:46 am
    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:

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

    (< & > 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:

    1091,1093c1091,1093
    < return preg_replace_callback(
    < "#<!-- INCLUDE (.*) -->#im",
    < create_function('$matches', 'return
    $this->getFile($matches[1]);'),
    ---
    return preg_replace(
    "#<!-- INCLUDE (.*) -->#ime",
    "\$this->getFile('\\1')",
    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

    Description:
    ------------
    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
    instead

    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
    5.5

    I have run all PEAR updates but the problem persists.

    Test script:
    ---------------
    You can see this error in action at
    http://moretoit.net/practicemonitor/


    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.

    ------------------------------------------------------------------------

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedFeb 8, '16 at 10:44a
activeFeb 8, '16 at 10:46a
posts2
users1
websitepear.php.net

1 user in discussion

Ale Comp_06: 2 posts

People

Translate

site design / logo © 2022 Grokbase