FIX PHP Fatal Error on an invalid Blip Field.
For (still) unknown reasons, PHPExcel detects a wrong field type. If there is no BSE Index, we will fail here and other fields are not read. So if the BSE Index < 1, continue with the next field. TODO: Why is there no BSE Index? Is this a new Office Version? Password protected field? More likely : a uncompatible picture PHP Notice: Undefined offset: -1 in Classes/PHPExcel/Reader/Excel5.php on line 1063 PHP Fatal error: Call to a member function getBlipType() on a non-object in Classes/PHPExcel/Reader/Excel5.php on line 1064
This commit is contained in:
parent
c1f5bdba5d
commit
b964788d5c
|
@ -1031,6 +1031,15 @@ class Xls extends BaseReader implements IReader
|
|||
// picture
|
||||
// get index to BSE entry (1-based)
|
||||
$BSEindex = $spContainer->getOPT(0x0104);
|
||||
|
||||
// If there is no BSE Index, we will fail here and other fields are not read.
|
||||
// Fix by checking here.
|
||||
// TODO: Why is there no BSE Index? Is this a new Office Version? Password protected field?
|
||||
// More likely : a uncompatible picture
|
||||
if (!$BSEindex) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$BSECollection = $escherWorkbook->getDggContainer()->getBstoreContainer()->getBSECollection();
|
||||
$BSE = $BSECollection[$BSEindex - 1];
|
||||
$blipType = $BSE->getBlipType();
|
||||
|
|
Loading…
Reference in New Issue