X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FaddSite.php;h=8fb0d68a373963013ecc9889a1402b87ca911c7c;hb=40c9d733e60509e4734ade849403a45458d61ab2;hp=4953343fd9526f2c13c990ed39f8285f1697dde6;hpb=7babd362babcbf7f20adb8e12edb4f4bc1d4249f;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/addSite.php b/maintenance/addSite.php index 4953343fd9..8fb0d68a37 100644 --- a/maintenance/addSite.php +++ b/maintenance/addSite.php @@ -11,7 +11,7 @@ require_once $basePath . '/maintenance/Maintenance.php'; * * @since 1.29 * - * @license GNU GPL v2+ + * @license GPL-2.0-or-later * @author Florian Schmidt */ class AddSite extends Maintenance { @@ -39,7 +39,10 @@ class AddSite extends Maintenance { */ public function execute() { $siteStore = MediaWikiServices::getInstance()->getSiteStore(); - $siteStore->reset(); + if ( method_exists( $siteStore, 'reset' ) ) { + // @phan-suppress-next-line PhanUndeclaredMethod + $siteStore->reset(); + } $globalId = $this->getArg( 0 ); $group = $this->getArg( 1 ); @@ -81,6 +84,7 @@ class AddSite extends Maintenance { $siteStore->saveSites( [ $site ] ); if ( method_exists( $siteStore, 'reset' ) ) { + // @phan-suppress-next-line PhanUndeclaredMethod $siteStore->reset(); }