Merge "Fix undefined property in PoolCounterWork"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 6 Mar 2014 23:49:04 +0000 (23:49 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 6 Mar 2014 23:49:04 +0000 (23:49 +0000)
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() );
        }