From 8c62609dc877b6ed687e9a3835cfc24fb87e5be2 Mon Sep 17 00:00:00 2001 From: Jeff Date: Tue, 22 Apr 2014 23:56:23 -0700 Subject: [PATCH] PostgreSQL: decode image.img_metadata The img_metadata field was not being decoded from bytea into text. This change to core fixes the reported problem with PdfHandler against 1.22.6, origin/REL1_23 and git head. Bug: 59147 Change-Id: I285a317a57a29713af1f7f630b340278bd5400da --- includes/filerepo/file/LocalFile.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/filerepo/file/LocalFile.php b/includes/filerepo/file/LocalFile.php index 4b8e590d0f..b3d5d5dc51 100644 --- a/includes/filerepo/file/LocalFile.php +++ b/includes/filerepo/file/LocalFile.php @@ -496,6 +496,8 @@ class LocalFile extends File { $decoded['timestamp'] = wfTimestamp( TS_MW, $decoded['timestamp'] ); + $decoded['metadata'] = $this->repo->getSlaveDB()->decodeBlob( $decoded['metadata'] ); + if ( empty( $decoded['major_mime'] ) ) { $decoded['mime'] = 'unknown/unknown'; } else { -- 2.20.1