mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 13:47:31 +02: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:
@@ -549,7 +549,7 @@ class xmlClass
|
|||||||
|
|
||||||
$ret = array();
|
$ret = array();
|
||||||
|
|
||||||
$tags = get_object_vars($xml);
|
$tags = (array) $xml;
|
||||||
|
|
||||||
|
|
||||||
//remove comments
|
//remove comments
|
||||||
|
Reference in New Issue
Block a user