Fix undefined property in PoolCounterWork
authoraude <aude.wiki@gmail.com>
Thu, 6 Mar 2014 23:32:47 +0000 (00:32 +0100)
committeraude <aude.wiki@gmail.com>
Thu, 6 Mar 2014 23:34:50 +0000 (00:34 +0100)
Change-Id: I033288d31dcef2120eb9239d1bc690d5cb0edda6

includes/PoolCounter.php

index 3d4c464..7acabfd 100644 (file)
@@ -91,6 +91,13 @@ abstract class PoolCounter {
                return new $class( $conf, $type, $key );
        }
 
+       /**
+        * @return string
+        */
+       public function getKey() {
+               return $this->key;
+       }
+
        /**
         * I want to do this task and I need to do it myself.
         *
@@ -186,7 +193,9 @@ abstract class PoolCounterWork {
         * @return void
         */
        function logError( $status ) {
-               wfDebugLog( 'poolcounter', "Pool key '{$this->key}': "
+               $key = $this->poolCounter->getKey();
+
+               wfDebugLog( 'poolcounter', "Pool key '$key': "
                        . $status->getMessage()->inLanguage( 'en' )->useDatabase( false )->text() );
        }