X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FdoMaintenance.php;h=1c53fe84000a64d117ce2d4657eae3d59a271b6f;hb=2ef8fe6584cc16d5d01f21accdebaefc05f5d661;hp=f3fb32ce62348594ba3108334d0872c72e9acb44;hpb=07a791ffd1d80c6a8f2ca4dfdbc3f2002ac869fe;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/doMaintenance.php b/maintenance/doMaintenance.php index f3fb32ce62..1c53fe8400 100644 --- a/maintenance/doMaintenance.php +++ b/maintenance/doMaintenance.php @@ -90,8 +90,10 @@ $maintenance->checkRequiredExtensions(); // This avoids having long running scripts just OOM and lose all the updates. $maintenance->setAgentAndTriggers(); +$maintenance->validateParamsAndArgs(); + // Do the work -$maintenance->execute(); +$success = $maintenance->execute(); // Potentially debug globals $maintenance->globals(); @@ -111,3 +113,8 @@ if ( isset( $lbFactory ) ) { $lbFactory->commitMasterChanges( 'doMaintenance' ); $lbFactory->shutdown( $lbFactory::SHUTDOWN_NO_CHRONPROT ); } + +// Exit with an error status if execute() returned false +if ( $success === false ) { + exit( 1 ); +}