1
0
mirror of https://github.com/e107inc/e107.git synced 2025-03-14 01:19:44 +01:00

#4938: Workaround for PHP 8.2.0 segmentation fault / assertion error

Casting a `SimpleXMLElement` to an array should be equivalent to
`get_object_vars(…)` as far as I can tell.  At least all existing
tests pass and I don't see any visual regressions upon making this
change.

By replacing `get_object_vars(…)` with a cast to array, we sidestep
this PHP 8.2.0 bug: https://github.com/php/php-src/issues/10200

Fixes: https://github.com/e107inc/e107/issues/4938
This commit is contained in:
Nick Liu 2023-01-02 14:24:57 +01:00
parent f564f95640
commit 6b75f341ad
No known key found for this signature in database
GPG Key ID: 1167C5F9C9897637

View File

@ -549,7 +549,7 @@ class xmlClass
$ret = array();
$tags = get_object_vars($xml);
$tags = (array) $xml;
//remove comments