Umherirrender has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/332379 )
Change subject: Bypass edits from tests ...................................................................... Bypass edits from tests The premoderation breaks tests, because it throws an exception, but there was no skin set to show this exception. Bypass the test edits to avoid a failure. PHP Fatal error: Call to a member function canExist() on a non-object in /srv/jenkins-workspace/workspace/mwext-testextension-php55/src/includes/skins/Skin.php on line 212 PHP Stack trace: PHP 1. MWExceptionHandler::handleException() /srv/jenkins-workspace/workspace/mwext-testextension-php55/src/includes/exception/MWExceptionHandler.php:0 PHP 2. MWExceptionHandler::report() /srv/jenkins-workspace/workspace/mwext-testextension-php55/src/includes/exception/MWExceptionHandler.php:139 PHP 3. ErrorPageError->report() /srv/jenkins-workspace/workspace/mwext-testextension-php55/src/includes/exception/MWExceptionHandler.php:71 PHP 4. OutputPage->output() /srv/jenkins-workspace/workspace/mwext-testextension-php55/src/includes/exception/ErrorPageError.php:67 PHP 5. SkinTemplate->outputPage() /srv/jenkins-workspace/workspace/mwext-testextension-php55/src/includes/OutputPage.php:2382 PHP 6. SkinFallback->initPage() /srv/jenkins-workspace/workspace/mwext-testextension-php55/src/includes/skins/SkinTemplate.php:248 PHP 7. Skin->initPage() /srv/jenkins-workspace/workspace/mwext-testextension-php55/src/includes/skins/SkinFallback.php:33 PHP 8. Skin->preloadExistence() /srv/jenkins-workspace/workspace/mwext-testextension-php55/src/includes/skins/Skin.php:145 Change-Id: I0ace268cd7f6a036da8e5dd18bb42ce24842f50a --- M Premoderation.class.php 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Premoderation refs/changes/79/332379/1 diff --git a/Premoderation.class.php b/Premoderation.class.php index f7cd62a..3f89a7b 100644 --- a/Premoderation.class.php +++ b/Premoderation.class.php @@ -45,7 +45,9 @@ $section, $flags, $status ) { global $wgRequest; $userIP = $wgRequest->getIP(); - if( $user->isAllowed( 'skipmoderation' ) || self::checkWhitelist( $userIP ) ) { + if( $user->isAllowed( 'skipmoderation' ) || self::checkWhitelist( $userIP ) + || defined( 'MW_PARSER_TEST' ) || defined( 'MW_PHPUNIT_TEST' ) // bypass test edits + ) { return true; } -- To view, visit https://gerrit.wikimedia.org/r/332379 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0ace268cd7f6a036da8e5dd18bb42ce24842f50a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Premoderation Gerrit-Branch: master Gerrit-Owner: Umherirrender <umherirrender_de...@web.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits