From a8cc4dc52cb73cea3553b53cd0ff426fe272da28 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Sun, 4 Dec 2005 20:43:42 +0000 Subject: [PATCH] initialize array before preg_match* --- includes/Sanitizer.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php index ef92e28db3..c4f6a70bb4 100644 --- a/includes/Sanitizer.php +++ b/includes/Sanitizer.php @@ -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, -- 2.20.1