You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-php/PEAR-HTML_Template_IT/files/preg-callback.patch

18 lines
625 B

diff -aurN a/HTML/Template/IT.php b/HTML/Template/IT.php
--- a/HTML/Template/IT.php 2010-03-10 03:08:10.000000000 -0500
+++ b/HTML/Template/IT.php 2017-08-01 15:12:31.161235223 -0400
@@ -1088,9 +1088,10 @@
$content = fread($fh, $fsize);
fclose($fh);
- return preg_replace(
- "#<!-- INCLUDE (.*) -->#ime",
- "\$this->getFile('\\1')",
+ return preg_replace_callback(
+ "#<!-- INCLUDE (.*) -->#im",
+ function($matches) {
+ return $this->getFile($matches[1]); },
$content
);
} // end func getFile