initialize array before preg_match*
authorAntoine Musso <hashar@users.mediawiki.org>
Sun, 4 Dec 2005 20:43:42 +0000 (20:43 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Sun, 4 Dec 2005 20:43:42 +0000 (20:43 +0000)
includes/Sanitizer.php

index ef92e28..c4f6a70 100644 (file)
@@ -532,6 +532,7 @@ class Sanitizer {
                # Unquoted attribute
                # Since we quote this later, this can be anything distinguishable 
                # from the end of the attribute
+               $pairs = array();
                if( !preg_match_all(
                        MW_ATTRIBS_REGEX,
                        $text,
@@ -623,7 +624,8 @@ class Sanitizer {
                if( trim( $text ) == '' ) {
                        return $attribs;
                }
-               
+
+               $pairs = array();       
                if( !preg_match_all(
                        MW_ATTRIBS_REGEX,
                        $text,