Skip to content

Commit 9d86e73

Browse files
Merge branch '4.4' into 5.0
* 4.4: (27 commits) [Serializer] minor cleanup fix merge Run PHP 8 as 7.4.99 Remove calls to deprecated ReflectionParameter::getClass(). [VarDumper] fix PHP 8 support Add php 8 to travis. [Cache] Accessing undefined constants raises an Error in php8 [Cache] allow DBAL v3 Skip Doctrine DBAL on php 8 until we have a compatible version. [DomCrawler] Catch expected ValueError. Made method signatures compatible with their corresponding traits. [ErrorHandler] Apply php8 fixes from Debug component. [DomCrawler] Catch expected ValueError. [Validator] Catch expected ValueError. [VarDumper] ReflectionFunction::isDisabled() is deprecated. [BrowserKit] Raw body with custom Content-Type header [PropertyAccess] Parse php 8 TypeErrors correctly. [Intl] Fix call to ReflectionProperty::getValue() for static properties. [HttpKernel] Prevent calling method_exists() with non-string values. Fix wrong roles comparison ...
2 parents 92ff7fc + c18354d commit 9d86e73

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Crawler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,11 +1143,11 @@ private function convertToHtmlEntities(string $htmlContent, string $charset = 'U
11431143

11441144
try {
11451145
return mb_convert_encoding($htmlContent, 'HTML-ENTITIES', $charset);
1146-
} catch (\Exception $e) {
1146+
} catch (\Exception | \ValueError $e) {
11471147
try {
11481148
$htmlContent = iconv($charset, 'UTF-8', $htmlContent);
11491149
$htmlContent = mb_convert_encoding($htmlContent, 'HTML-ENTITIES', 'UTF-8');
1150-
} catch (\Exception $e) {
1150+
} catch (\Exception | \ValueError $e) {
11511151
}
11521152

11531153
return $htmlContent;

0 commit comments

Comments
 (0)