Stop doing $that = $this in includes/deferred
authorRicordisamoa <ricordisamoa@openmailbox.org>
Wed, 10 Feb 2016 17:22:59 +0000 (18:22 +0100)
committerAddshore <addshorewiki@gmail.com>
Wed, 10 Feb 2016 17:53:29 +0000 (17:53 +0000)
Closures support $this as of PHP 5.4

Change-Id: I2632d0c2bdc9e2fec72f1c64c3868dcb442ba871

includes/deferred/LinksUpdate.php

index 3021af1..9cd20fc 100644 (file)
@@ -143,9 +143,8 @@ class LinksUpdate extends SqlDataUpdate implements EnqueueableDataUpdate {
                Hooks::run( 'LinksUpdate', array( &$this ) );
                $this->doIncrementalUpdate();
 
-               $that = $this;
-               $this->mDb->onTransactionIdle( function() use ( $that ) {
-                       Hooks::run( 'LinksUpdateComplete', array( &$that ) );
+               $this->mDb->onTransactionIdle( function() {
+                       Hooks::run( 'LinksUpdateComplete', array( &$this ) );
                } );
        }