Skip to content

Commit

Permalink
[TASK] Fix phpstan checkFunctionArgumentTypes errors in ext:core Type
Browse files Browse the repository at this point in the history
This patch fixes incompatible type usage in function arguments
and is preparatory work for introducing native type hints and
strict mode in all core files.

Releases: master, 10.4
Resolves: #92254
Change-Id: I3c5d0625a497acd10696b8ce6ea58a9fa891bc18
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/65671
Tested-by: Sascha Egerer <sascha@sascha-egerer.de>
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Daniel Goerz <daniel.goerz@posteo.de>
Reviewed-by: Sascha Egerer <sascha@sascha-egerer.de>
Reviewed-by: Daniel Goerz <daniel.goerz@posteo.de>
  • Loading branch information
alexanderschnitzler authored and ervaude committed Sep 11, 2020
1 parent bc3dee0 commit e1149c1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions typo3/sysext/core/Classes/Type/File/ImageInfo.php
Expand Up @@ -120,6 +120,9 @@ protected function extractSvgImageSizes()
$imagesSizes = [];

$fileContent = file_get_contents($this->getPathname());
if ($fileContent === false) {
return false;
}
// Disables the functionality to allow external entities to be loaded when parsing the XML, must be kept
$previousValueOfEntityLoader = libxml_disable_entity_loader(true);
$xml = simplexml_load_string($fileContent, \SimpleXMLElement::class, LIBXML_NOERROR | LIBXML_NOWARNING);
Expand Down

0 comments on commit e1149c1

Please sign in to comment.