Ignore images with missing data when reading xlsx

Ignore images with missing data when reading xlsx

Fixes #94, closes #95
This commit is contained in:
Alex Milde 2017-02-16 01:42:07 +01:00 committed by Adrien Crivelli
parent 1c4f1150a6
commit 47d7260c43
1 changed files with 5 additions and 0 deletions

View File

@ -1484,6 +1484,11 @@ class Xlsx extends BaseReader implements IReader
foreach ($shapes as $idx => $shape) {
$shape->registerXPathNamespace('v', 'urn:schemas-microsoft-com:vml');
$imageData = $shape->xpath('//v:imagedata');
if (!$imageData) {
continue;
}
$imageData = $imageData[$idx];
$imageData = $imageData->attributes('urn:schemas-microsoft-com:office:office');