diff --git a/MathCaptcha/includes/MathCaptcha.php b/MathCaptcha/includes/MathCaptcha.php index e0e7aa47b..a4947a65c 100644 --- a/MathCaptcha/includes/MathCaptcha.php +++ b/MathCaptcha/includes/MathCaptcha.php @@ -45,7 +45,7 @@ class MathCaptcha extends SimpleCaptcha { $index = $this->storeCaptcha( [ 'answer' => $answer ] ); $form = '
' . $this->fetchMath( $sum ) . ' | '; - $form .= '' . Html::input( 'wpCaptchaWord', false, false, [ + $form .= ' | ' . Html::input( 'wpCaptchaWord', '', '', [ 'tabindex' => $tabIndex, 'autocomplete' => 'off', 'required' @@ -69,7 +69,7 @@ class MathCaptcha extends SimpleCaptcha { /** * Fetch the math - * @param int $sum + * @param string $sum * @return string */ private function fetchMath( $sum ) { diff --git a/SimpleCaptcha/SimpleCaptcha.php b/SimpleCaptcha/SimpleCaptcha.php index 238a23f82..c910ded9a 100644 --- a/SimpleCaptcha/SimpleCaptcha.php +++ b/SimpleCaptcha/SimpleCaptcha.php @@ -1087,7 +1087,7 @@ class SimpleCaptcha { * @private */ private function loadText( $title, $section, $flags = Revision::READ_LATEST ) { - $rev = Revision::newFromTitle( $title, false, $flags ); + $rev = Revision::newFromTitle( $title, 0, $flags ); if ( is_null( $rev ) ) { return ""; } diff --git a/composer.json b/composer.json index 052078efb..a4c741059 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "mediawiki/mediawiki-codesniffer": "28.0.0", "jakub-onderka/php-console-highlighter": "0.3.2", "mediawiki/minus-x": "0.3.2", - "mediawiki/mediawiki-phan-config": "0.8.0" + "mediawiki/mediawiki-phan-config": "0.9.0" }, "scripts": { "test": [ diff --git a/includes/store/CaptchaStore.php b/includes/store/CaptchaStore.php index 8eff87c7e..3be136374 100644 --- a/includes/store/CaptchaStore.php +++ b/includes/store/CaptchaStore.php @@ -29,7 +29,7 @@ abstract class CaptchaStore { /** * The singleton instance - * @var CaptchaStore + * @var CaptchaStore|null */ private static $instance; diff --git a/maintenance/GenerateFancyCaptchas.php b/maintenance/GenerateFancyCaptchas.php index b5dddf3bc..9876bd4e7 100644 --- a/maintenance/GenerateFancyCaptchas.php +++ b/maintenance/GenerateFancyCaptchas.php @@ -100,7 +100,7 @@ class GenerateFancyCaptchas extends Maintenance { wfEscapeShellArg( dirname( __DIR__ ) . '/' . $captchaScript ), wfEscapeShellArg( $wgCaptchaSecret ), wfEscapeShellArg( $tmpDir ), - wfEscapeShellArg( $countGen ), + wfEscapeShellArg( (string)$countGen ), wfEscapeShellArg( $wgCaptchaDirectoryLevels ) ); foreach ( |