Fix bug while releasing session key:

Uncaught exception 'Meritoo\LimeSurvey\ApiClient\Exception\UnknownMethodException' with message 'The 'get_session_key' type of name of method used while talking to the LimeSurvey's API is unknown
This commit is contained in:
Meritoo
2017-09-26 09:10:40 +02:00
parent e803d82844
commit 0eb6cc85a2
4 changed files with 13 additions and 3 deletions

View File

@@ -77,7 +77,8 @@ class Client
public function run($method, $arguments = [])
{
/*
* Let's validate method
* Let's validate method.
* It's called in the JsonRpcClientManager::runMethod() too, but I want to verify it before getting session key.
*/
$method = MethodType::getValidatedMethod($method);

View File

@@ -96,7 +96,7 @@ class MethodType extends BaseType
*/
public static function getValidatedMethod($method)
{
if ((new static())->isCorrectType($method)) {
if ((new static())->isCorrectType($method) || (new SystemMethodType())->isCorrectType($method)) {
return $method;
}