Use PHP 7 '??' operator instead of '?:' with 'isset()' where convenient
[lhc/web/wiklou.git] / includes / libs / mime / XmlTypeCheck.php
index 9761108..e231113 100644 (file)
@@ -294,7 +294,7 @@ class XmlTypeCheck {
 
        /**
         * @param string $name element or attribute name, maybe with a full or short prefix
-        * @param string $namespaceURI the namespaceURI
+        * @param string $namespaceURI
         * @return string the name prefixed with namespaceURI
         */
        private function expandNS( $name, $namespaceURI ) {
@@ -376,7 +376,7 @@ class XmlTypeCheck {
                if ( !$externalCallback && !$generalCallback && !$checkIfSafe ) {
                        return;
                }
-               $dtd = $reader->readOuterXML();
+               $dtd = $reader->readOuterXml();
                $callbackReturn = false;
 
                if ( $generalCallback ) {
@@ -394,8 +394,8 @@ class XmlTypeCheck {
                        $callbackReturn = call_user_func(
                                $externalCallback,
                                $parsedDTD['type'],
-                               isset( $parsedDTD['publicid'] ) ? $parsedDTD['publicid'] : null,
-                               isset( $parsedDTD['systemid'] ) ? $parsedDTD['systemid'] : null
+                               $parsedDTD['publicid'] ?? null,
+                               $parsedDTD['systemid'] ?? null
                        );
                }
                if ( $callbackReturn ) {