Various obvious bug fixes and better PHP 7 support

Many of these came from a XRevan86 patch
This commit is contained in:
Diogo Cordeiro
2019-04-26 00:34:17 +01:00
parent c4f962a7d0
commit 7967db6ff5
28 changed files with 652 additions and 681 deletions

View File

@@ -51,13 +51,15 @@ class QnashowanswerAction extends ShownoticeAction
/**
* For initializing members of the class.
*
* @param array $argarray misc. arguments
* @param array $args misc. arguments
*
* @return boolean true
* @throws ClientException
* @throws ServerException
*/
function prepare($argarray)
function prepare(array $args = [])
{
Action::prepare($argarray);
Action::prepare($args);
$this->id = $this->trimmed('id');
@@ -117,8 +119,8 @@ class QnashowanswerAction extends ShownoticeAction
$question = $this->answer->getQuestion();
return sprintf(
// TRANS: Page title.
// TRANS: %1$s is the user who answered a question, %2$s is the question.
// TRANS: Page title.
// TRANS: %1$s is the user who answered a question, %2$s is the question.
_m('%1$s\'s answer to "%2$s"'),
$this->user->nickname,
$question->title