Steps to replicate the issue (include links if applicable):
- Visit to /w/api.php?action=validatepassword&password=qwerty&user=Example (module requires POST for requests)
What happens?:
[2024-04-10T17:39:36.454687+00:00] error.WARNING: [1a4524b8765d41133ee5c4af] /w/api.php?action=validatepassword&password=querty&user=Example PHP Deprecated: Exception::__construct(): Passing null to parameter #2 ($code) of type int is deprecated {"exception":"[object] (ErrorException(code: 0): PHP Deprecated: Exception::__construct(): Passing null to parameter #2 ($code) of type int is deprecated at /www/[XXX]/tags/2024-04-07_15:54:39/includes/api/ApiUsageException.php:58) [stacktrace] #0 [internal function]: MWExceptionHandler::handleError(8192, 'Exception::__co...', '/www/[XXX]...', 58) #1 /www/[XXX]/tags/2024-04-07_15:54:39/includes/api/ApiUsageException.php(58): Exception->__construct('The \"validatepa...', NULL, NULL) #2 /www/[XXX]/tags/2024-04-07_15:54:39/includes/api/ApiUsageException.php(73): ApiUsageException->__construct(Object(ApiMain), Object(StatusValue), NULL, NULL) #3 /www/[XXX]/tags/2024-04-07_15:54:39/includes/api/ApiBase.php(1516): ApiUsageException::newWithMessage(Object(ApiMain), Array, NULL, NULL, NULL) #4 /www/[XXX]/tags/2024-04-07_15:54:39/includes/api/ApiBase.php(1690): ApiBase->dieWithError(Array, NULL, NULL, NULL) #5 /www/[XXX]/tags/2024-04-07_15:54:39/includes/api/ApiMain.php(1878): ApiBase->dieWithErrorOrDebug(Array) #6 /www/[XXX]/tags/2024-04-07_15:54:39/includes/api/ApiMain.php(1932): ApiMain->setupExternalResponse(Object(ApiValidatePassword), Array) #7 /www/[XXX]/tags/2024-04-07_15:54:39/includes/api/ApiMain.php(912): ApiMain->executeAction() #8 /www/[XXX]/tags/2024-04-07_15:54:39/includes/api/ApiMain.php(883): ApiMain->executeActionWithErrorHandling() #9 /www/[XXX]/tags/2024-04-07_15:54:39/api.php(95): ApiMain->execute() #10 /www/[XXX]/tags/2024-04-07_15:54:39/api.php(48): wfApiMain() #11 {main} ","exception_url":"/w/api.php?action=validatepassword&password=querty&user=Example","reqId":"1a4524b8765d41133ee5c4af","caught_by":"mwe_handler"} []
What should have happened instead?:
No deprecation warning
Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
1.41.1 and PHP 8.2.7
Other information (browser name/version, screenshots, etc.):