Fix undefined property domain in AuthPlugin
authorReedy <reedy@wikimedia.org>
Thu, 21 Jun 2012 21:56:12 +0000 (22:56 +0100)
committerReedy <reedy@wikimedia.org>
Thu, 21 Jun 2012 21:56:12 +0000 (22:56 +0100)
[21-Jun-2012 20:35:17] PHP Notice:  Undefined property: AuthPlugin::$domain in /www/w/includes/AuthPlugin.php on line 92

Change-Id: I0c470b41881e0fd12d9615f7ac258feeff1a52e4

includes/AuthPlugin.php

index 9cdd4f3..c7fcf93 100644 (file)
  * someone logs in who can be authenticated externally.
  */
 class AuthPlugin {
+
+       /**
+        * @var string
+        */
+       protected $domain;
+
        /**
         * Check whether there exists a user account with the given name.
         * The name will be normalized to MediaWiki's requirements, so
@@ -89,7 +95,7 @@ class AuthPlugin {
         * @return string
         */
        public function getDomain() {
-               if ( $this->domain ) {
+               if ( isset( $this->domain ) ) {
                        return $this->domain;
                } else {
                        return 'invaliddomain';