summaryrefslogtreecommitdiff
path: root/extensions/PdfHandler/PdfHandler_body.php
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/PdfHandler/PdfHandler_body.php')
-rw-r--r--extensions/PdfHandler/PdfHandler_body.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/extensions/PdfHandler/PdfHandler_body.php b/extensions/PdfHandler/PdfHandler_body.php
index 0b192bbb..7cb9a51d 100644
--- a/extensions/PdfHandler/PdfHandler_body.php
+++ b/extensions/PdfHandler/PdfHandler_body.php
@@ -271,11 +271,14 @@ class PdfHandler extends ImageHandler {
return false;
}
- wfProfileIn( __METHOD__ );
- wfSuppressWarnings();
- $image->pdfMetaArray = unserialize( $metadata );
- wfRestoreWarnings();
- wfProfileOut( __METHOD__ );
+ $work = new PoolCounterWorkViaCallback( 'PdfHandler-unserialize-metadata', $image->getName(), array(
+ 'doWork' => function() use ( $image, $metadata ) {
+ wfSuppressWarnings();
+ $image->pdfMetaArray = unserialize( $metadata );
+ wfRestoreWarnings();
+ },
+ ) );
+ $work->execute();
return $image->pdfMetaArray;
}