[BUGFIX] Check simplexml return type in ImageInfo 28/54828/5
authorTim Spiekerkötter <tim.spiekerkoetter@hdnet.de>
Fri, 17 Feb 2017 10:05:13 +0000 (11:05 +0100)
committerMarkus Klein <markus.klein@typo3.org>
Tue, 28 Nov 2017 14:29:28 +0000 (15:29 +0100)
commit1d63c773f61382faa8c939b1325270ad745a0db1
tree75b279ad91a8bbd0b7dbc7be9707337398c367a1
parentbb39b2263acca70ad4cd78e787da9edfc332c767
[BUGFIX] Check simplexml return type in ImageInfo

According to the php documentation[1] simplexml_load_file may return
false on failure. We need to check for this before we call the
attributes method on the expected SimpleXMLElement.

[1] http://php.net/manual/en/function.simplexml-load-file.php

Resolves: #79881
Releases: master, 8.7
Change-Id: Ic84710ab56796e9aafc5a85c8e41d7b08a676e0c
Reviewed-on: https://review.typo3.org/54828
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/core/Classes/Type/File/ImageInfo.php
typo3/sysext/core/Tests/Unit/Type/File/ImageInfoTest.php