Fix Warning if $relsVML->Relationship is NULL (#1420)

Fix Warning if $relsVML->Relationship is NULL (#1420)
This commit is contained in:
Collie-IT 2020-05-23 12:56:26 +02:00 committed by GitHub
parent 0945e87b6d
commit 6c23de78d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -1000,12 +1000,13 @@ class Xlsx extends BaseReader
Settings::getLibXmlLoaderOptions() Settings::getLibXmlLoaderOptions()
); );
$drawings = []; $drawings = [];
if (isset($relsVML->Relationship)) {
foreach ($relsVML->Relationship as $ele) { foreach ($relsVML->Relationship as $ele) {
if ($ele['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image') { if ($ele['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image') {
$drawings[(string) $ele['Id']] = self::dirAdd($vmlRelationship, $ele['Target']); $drawings[(string) $ele['Id']] = self::dirAdd($vmlRelationship, $ele['Target']);
} }
} }
}
// Fetch VML document // Fetch VML document
$vmlDrawing = simplexml_load_string( $vmlDrawing = simplexml_load_string(
$this->securityScanner->scan($this->getFromZipArchive($zip, $vmlRelationship)), $this->securityScanner->scan($this->getFromZipArchive($zip, $vmlRelationship)),