Fixed undefined var notice.
authorAaron <aschulz@wikimedia.org>
Fri, 18 May 2012 22:19:12 +0000 (15:19 -0700)
committerAaron <aschulz@wikimedia.org>
Fri, 18 May 2012 22:19:16 +0000 (15:19 -0700)
* Fixed "Notice: Undefined variable: addmsg in /var/www/TrunkWiki/core/languages/Language.php on line 254"

Change-Id: Ib5fa6b7c1137f24bc998249af72eaf7301a2aaa8

languages/Language.php

index 240b0d3..ec20383 100644 (file)
@@ -250,6 +250,8 @@ class Language {
                        $type = gettype( $code );
                        if( $type === 'object' ) {
                                $addmsg = " of class " . get_class( $code );
+                       } else {
+                               $addmsg = '';
                        }
                        throw new MWException( __METHOD__ . " must be passed a string, $type given$addmsg" );
                }