Use isset() instead of array_key_exists()
authorChad Horohoe <demon@users.mediawiki.org>
Wed, 27 Jan 2010 19:14:18 +0000 (19:14 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Wed, 27 Jan 2010 19:14:18 +0000 (19:14 +0000)
includes/Html.php

index a17e033..ed06411 100644 (file)
@@ -513,9 +513,9 @@ class Html {
                global $wgHtml5;
                $attribs['name'] = $name;
                if ( !$wgHtml5 ) {
-                       if ( !array_key_exists('cols', $attribs) )
+                       if ( !isset( $attribs['cols'] ) )
                                $attribs['cols'] = "";
-                       if ( !array_key_exists('rows', $attribs) )
+                       if ( !isset( $attribs['rows'] ) )
                                $attribs['rows'] = "";
                }
                return self::element( 'textarea', $attribs, $value );