Merge "Support all values for exif PhotometricInterpretation"
[lhc/web/wiklou.git] / includes / libs / IEUrlExtension.php
index 065fc3c..216d9b7 100644 (file)
@@ -55,8 +55,8 @@ class IEUrlExtension {
         *
         * If the a variable is unset in $_SERVER, it should be unset in $vars.
         *
-        * @param $vars array A subset of $_SERVER.
-        * @param $extWhitelist array Extensions which are allowed, assumed harmless.
+        * @param array $vars A subset of $_SERVER.
+        * @param array $extWhitelist Extensions which are allowed, assumed harmless.
         * @return bool
         */
        public static function areServerVarsBad( $vars, $extWhitelist = array() ) {
@@ -92,8 +92,8 @@ class IEUrlExtension {
         * Given a right-hand portion of a URL, determine whether IE would detect
         * a potentially harmful file extension.
         *
-        * @param $urlPart string The right-hand portion of a URL
-        * @param $extWhitelist array An array of file extensions which may occur in this
+        * @param string $urlPart The right-hand portion of a URL
+        * @param array $extWhitelist An array of file extensions which may occur in this
         *    URL, and which should be allowed.
         * @return bool
         */
@@ -119,7 +119,6 @@ class IEUrlExtension {
 
                if ( !preg_match( '/^[a-zA-Z0-9_-]+$/', $extension ) ) {
                        // Non-alphanumeric extension, unlikely to be registered.
-                       //
                        // The regex above is known to match all registered file extensions
                        // in a default Windows XP installation. It's important to allow
                        // extensions with ampersands and percent signs, since that reduces
@@ -187,7 +186,7 @@ class IEUrlExtension {
         * - if we find a possible extension followed by a dot or another illegal
         *   character, we ignore it and continue searching
         *
-        * @param $url string URL
+        * @param string $url URL
         * @return mixed Detected extension (string), or false if none found
         */
        public static function findIE6Extension( $url ) {
@@ -232,7 +231,7 @@ class IEUrlExtension {
                        }
                        // We found an illegal character or another dot
                        // Skip to that character and continue the loop
-                       $pos = $nextPos + 1;
+                       $pos = $nextPos;
                        $remainingLength = $urlLength - $pos;
                }
                return false;