Bug #20956 [Com]: preg_replace(): The /e modifier is deprecated

From: Date: Mon, 08 Feb 2016 10:44:28 +0000
Subject: Bug #20956 [Com]: preg_replace(): The /e modifier is deprecated
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-11309@lists.php.net to get a copy of this message
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 at moretoit dot 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. ------------------------------------------------------------------------ -- Edit this bug report at https://pear.php.net/bugs/bug.php?id=20956&edit=1

« previous php.pear.bugs (#11309) next »