From: Tim Starling Date: Wed, 8 Dec 2010 05:57:57 +0000 (+0000) Subject: Fix for r69139: create_function() is not allowed. X-Git-Tag: 1.31.0-rc.0~33450 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=6b6e09528d1b68d558addc1acdf51206ac62d0b1;p=lhc%2Fweb%2Fwiklou.git Fix for r69139: create_function() is not allowed. --- diff --git a/includes/DjVuImage.php b/includes/DjVuImage.php index c202024ef2..a55017e06e 100644 --- a/includes/DjVuImage.php +++ b/includes/DjVuImage.php @@ -266,10 +266,7 @@ class DjVuImage { | # Or page can be empty ; in this case, djvutxt dumps () \(\s*()\)/sx EOR; - $txt = preg_replace_callback( $reg, - create_function('$matches', 'return \'\';'), - $txt ); - + $txt = preg_replace_callback( $reg, array( $this, 'pageTextCallback' ), $txt ); $txt = "\n\n\n" . $txt . "\n\n"; $xml = preg_replace( "//", "", $xml ); $xml = $xml . $txt. '' ; @@ -278,6 +275,10 @@ EOR; return $xml; } + function pageTextCallback( $matches ) { + return ''; + } + /** * Hack to temporarily work around djvutoxml bug */