mirror of
https://github.com/wiosna-dev/limesurvey-api-client.git
synced 2026-03-12 10:11:49 +01:00
Client - run() method - use an empty array when raw data is unknown/null
This commit is contained in:
@@ -103,6 +103,18 @@ class Client
|
|||||||
->getRpcClientManager()
|
->getRpcClientManager()
|
||||||
->runMethod($method, $arguments);
|
->runMethod($method, $arguments);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Raw data is unknown?
|
||||||
|
* Let's use an empty array instead
|
||||||
|
*
|
||||||
|
* Required to avoid bug:
|
||||||
|
* Argument 2 passed to Meritoo\LimeSurvey\ApiClient\Result\Result::__construct() must be of the type array,
|
||||||
|
* null given
|
||||||
|
*/
|
||||||
|
if (null === $rawData) {
|
||||||
|
$rawData = [];
|
||||||
|
}
|
||||||
|
|
||||||
return new Result($method, $rawData);
|
return new Result($method, $rawData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user