Make maintenance/update.php parse again under PHP 4.1.0
authorPlatonides <platonides@gmail.com>
Tue, 26 Feb 2013 20:52:23 +0000 (21:52 +0100)
committerPlatonides <platonides@gmail.com>
Tue, 26 Feb 2013 20:52:23 +0000 (21:52 +0100)
The instanceof produces a parse error on old PHP versions,
which doesn't show the old-version error message.

Note that our is minimum PHP version is 5.3.2, so it won't
produce E_STRICTs (is_a() was undeprecated in 5.3.0)

Change-Id: I5904301759bd154dd87ed90a5176369e37346482

maintenance/update.php

index ba1d8cd..159b6b7 100644 (file)
@@ -154,7 +154,7 @@ class UpdateMediaWiki extends Maintenance {
                        $child = $this->runChild( $maint );
 
                        // LoggedUpdateMaintenance is checking the updatelog itself
-                       $isLoggedUpdate = ( $child instanceof LoggedUpdateMaintenance );
+                       $isLoggedUpdate = is_a( $child, 'LoggedUpdateMaintenance' );
 
                        if ( !$isLoggedUpdate && $updater->updateRowExists( $maint ) ) {
                                continue;