Skip to content

Commit

Permalink
Merge pull request #3412 from kdambekalns/task/drop-php-7-code
Browse files Browse the repository at this point in the history
TASK: Drop code for PHP < 8
  • Loading branch information
kitsunet authored Nov 5, 2024
2 parents 28739ca + d48e6ed commit 87c6087
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions Neos.Flow/Classes/Property/TypeConverter/MediaTypeConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,19 +92,9 @@ protected function convertMediaType($requestBody, $mediaType)
}
break;
case 'xml':
// TODO: Remove those lines once the minimum PHP version is 8.0
if (PHP_MAJOR_VERSION < 8) {
$entityLoaderValue = libxml_disable_entity_loader(true);
}
try {
$xmlElement = new \SimpleXMLElement(urldecode($requestBody), LIBXML_NOERROR);
if (PHP_MAJOR_VERSION < 8) {
libxml_disable_entity_loader($entityLoaderValue);
}
} catch (\Exception $exception) {
if (PHP_MAJOR_VERSION < 8) {
libxml_disable_entity_loader($entityLoaderValue);
}
return [];
}
$result = Arrays::convertObjectToArray($xmlElement);
Expand Down

0 comments on commit 87c6087

Please sign in to comment.