mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/PdfHandler
synced 2024-11-27 17:50:47 +00:00
Fix warning if pdfinfo fails but pdftext succedes.
Discovered when fixing bug 41281 Change-Id: I8c956da326e5dc339893a010370d399e97e204fd
This commit is contained in:
parent
e3492c3051
commit
a6d53125e2
|
@ -315,7 +315,7 @@ class PdfHandler extends ImageHandler {
|
|||
*/
|
||||
function pageCount( $image ) {
|
||||
$data = $this->getMetaArray( $image );
|
||||
if ( !$data ) {
|
||||
if ( !$data || !isset( $data['Pages'] ) ) {
|
||||
return false;
|
||||
}
|
||||
return intval( $data['Pages'] );
|
||||
|
|
Loading…
Reference in a new issue