From a3cdf1ab2ff8a963ef00c67ad4a61111c0ee1a3d Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Tue, 22 Sep 2009 17:41:34 +0000 Subject: [PATCH] Fix "Invalid argument for foreach()" in Html Reported by Nikerabbit on IRC to happen on Preferences, although I couldn't reproduce immediately. The change should be helpful for this kind of thing anyway. --- includes/Html.php | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/Html.php b/includes/Html.php index 068a9bff77..821822c038 100644 --- a/includes/Html.php +++ b/includes/Html.php @@ -107,6 +107,7 @@ class Html { */ public static function rawElement( $element, $attribs = array(), $contents = '' ) { global $wgHtml5, $wgWellFormedXml; + $attribs = (array)$attribs; # This is not required in HTML 5, but let's do it anyway, for # consistency and better compression. $element = strtolower( $element ); -- 2.20.1