[BUGFIX] Check simplexml return type in ImageInfo 35/51735/6
authorTim Spiekerkötter <tim.spiekerkoetter@hdnet.de>
Fri, 17 Feb 2017 10:05:13 +0000 (11:05 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Tue, 28 Nov 2017 11:14:23 +0000 (12:14 +0100)
commit8275f3af5fae2642da39dbc23ecedbeb3eb98470
tree97234b40e88b2af5936c1ebd9f33ce3b52ede2c2
parent6708d691034633cf02b1a7e32d79072f07339db7
[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/51735
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Classes/Type/File/ImageInfo.php
typo3/sysext/core/Tests/Unit/Type/File/ImageInfoTest.php