From 6b6e09528d1b68d558addc1acdf51206ac62d0b1 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Wed, 8 Dec 2010 05:57:57 +0000 Subject: [PATCH] Fix for r69139: create_function() is not allowed. --- includes/DjVuImage.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 */ -- 2.20.1