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

@@ -54,14 +54,16 @@ class TrainAction extends Action
/**
* 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 = [])
{
parent::prepare($argarray);
parent::prepare($args);
// User must be logged in.
@@ -111,12 +113,11 @@ class TrainAction extends Action
/**
* Handler method
*
* @param array $argarray is ignored since it's now passed in in prepare()
*
* @return void
* @throws ClientException
*/
function handle($argarray=null)
function handle()
{
// Train