diff --git a/app/code/core/Mage/Api/Model/Wsdl/Config/Element.php b/app/code/core/Mage/Api/Model/Wsdl/Config/Element.php index 0ca29cd0f15..e0c8b010fd8 100644 --- a/app/code/core/Mage/Api/Model/Wsdl/Config/Element.php +++ b/app/code/core/Mage/Api/Model/Wsdl/Config/Element.php @@ -44,7 +44,7 @@ public function extend($source, $overwrite = false) return $this; } - foreach ($this->getChildren($source) as $namespace => $children) { + foreach (self::_getChildren($source) as $namespace => $children) { foreach ($children as $child) { $this->extendChild($child, $overwrite, $namespace); } @@ -70,7 +70,7 @@ public function extendChild($source, $overwrite = false, $elmNamespace = '') $sourceName = $source->getName(); // here we have children of our source node - $sourceChildren = $this->getChildren($source); + $sourceChildren = self::_getChildren($source); if ($elmNamespace == '') { $elmNamespace = null; @@ -81,7 +81,7 @@ public function extendChild($source, $overwrite = false, $elmNamespace = '') $elm = $this->getElementByName($source, $elmNamespace); if (!is_null($elm)) { // if target already has children return without regard - if ($this->getChildren($elm)) { + if (self::_getChildren($elm)) { return $this; } if ($overwrite) { @@ -170,13 +170,24 @@ public function getAttributes($source, $namespace = null) return $attributes; } + /** + * @deprecated due to conflict with PHP8 parent class update + * @param Varien_Simplexml_Element $source + * @return array + */ + public function getChildren($source = null) + { + Mage::log('Use of deprecated method: '.__METHOD__); + return self::_getChildren($source); + } + /** * Return children of all namespaces * * @param Varien_Simplexml_Element $source * @return array */ - public function getChildren($source) + protected static function _getChildren($source) { $children = array(); $namespaces = $source->getNamespaces(true); @@ -200,12 +211,12 @@ public function getChildren($source) */ public function hasChildren() { - if (!$this->getChildren($this)) { + if (!self::_getChildren($this)) { return false; } // simplexml bug: @attributes is in children() but invisible in foreach - foreach ($this->getChildren($this) as $namespace => $children) { + foreach (self::_getChildren($this) as $namespace => $children) { foreach ($children as $k => $child) { return true; }