File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1385,7 +1385,7 @@ private function _getPageBoxes($page, $k) {
1385
1385
* Get the page rotation by pageno
1386
1386
*
1387
1387
* @param integer $pageno
1388
- * @return array
1388
+ * @return array|bool
1389
1389
*/
1390
1390
public function getPageRotation ($ pageno ) {
1391
1391
return $ this ->_getPageRotation ($ this ->pages [$ pageno - 1 ]);
@@ -1395,15 +1395,15 @@ private function _getPageRotation($obj) { // $obj = /Page
1395
1395
$ obj = $ this ->getObjectVal ($ obj );
1396
1396
if (isset ($ obj [1 ][1 ]['/Rotate ' ])) {
1397
1397
$ res = $ this ->getObjectVal ($ obj [1 ][1 ]['/Rotate ' ]);
1398
- if ($ res [0 ] == PDF_TYPE_OBJECT )
1398
+ if (is_array ( $ res ) && $ res [0 ] == PDF_TYPE_OBJECT )
1399
1399
return $ res [1 ];
1400
1400
return $ res ;
1401
1401
} else {
1402
1402
if (!isset ($ obj [1 ][1 ]['/Parent ' ])) {
1403
1403
return false ;
1404
1404
} else {
1405
1405
$ res = $ this ->_getPageRotation ($ obj [1 ][1 ]['/Parent ' ]);
1406
- if ($ res [0 ] == PDF_TYPE_OBJECT )
1406
+ if (is_array ( $ res ) && $ res [0 ] == PDF_TYPE_OBJECT )
1407
1407
return $ res [1 ];
1408
1408
return $ res ;
1409
1409
}
You can’t perform that action at this time.
0 commit comments