X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fxml.php;h=c184b5099ed758a30c961cc20e5438489f3aa8b1;hb=9f2196aa1aa0dc112e3fc238832828d4e22fe137;hp=9f7de8f33e66732fc790840eaf2e3cf3f0ea03cb;hpb=f852f7aac0b44f243d3cd812aa92122f7b38067b;p=friendica.git diff --git a/include/xml.php b/include/xml.php index 9f7de8f33e..c184b5099e 100644 --- a/include/xml.php +++ b/include/xml.php @@ -51,7 +51,7 @@ class xml { } foreach($array as $key => $value) { - if (!isset($element) AND isset($xml)) { + if (!isset($element) && isset($xml)) { $element = $xml; } @@ -67,7 +67,7 @@ class xml { } $element_parts = explode(":", $key); - if ((count($element_parts) > 1) AND isset($namespaces[$element_parts[0]])) { + if ((count($element_parts) > 1) && isset($namespaces[$element_parts[0]])) { $namespace = $namespaces[$element_parts[0]]; } elseif (isset($namespaces[""])) { $namespace = $namespaces[""]; @@ -76,18 +76,18 @@ class xml { } // Remove undefined namespaces from the key - if ((count($element_parts) > 1) AND is_null($namespace)) { + if ((count($element_parts) > 1) && is_null($namespace)) { $key = $element_parts[1]; } if (substr($key, 0, 11) == "@attributes") { - if (!isset($element) OR !is_array($value)) { + if (!isset($element) || !is_array($value)) { continue; } foreach ($value as $attr_key => $attr_value) { $element_parts = explode(":", $attr_key); - if ((count($element_parts) > 1) AND isset($namespaces[$element_parts[0]])) { + if ((count($element_parts) > 1) && isset($namespaces[$element_parts[0]])) { $namespace = $namespaces[$element_parts[0]]; } else { $namespace = NULL; @@ -323,7 +323,7 @@ class xml { if ($type == "open") { // The starting of the tag '' $parent[$level-1] = &$current; - if (!is_array($current) or (!in_array($tag, array_keys($current)))) { // Insert New tag + if (!is_array($current) || (!in_array($tag, array_keys($current)))) { // Insert New tag $current[$tag] = $result; if ($attributes_data) { $current[$tag. '_attr'] = $attributes_data; @@ -399,7 +399,7 @@ class xml { /** * @brief Delete a node in a XML object - * + * * @param object $doc XML document * @param string $node Node name */