FEHLER: Ein Parameter oder eine Subresource einer Methode ist nicht korrekt gewesen

die Syntax des Requests ist falsch
@param string $method
@param string $argument
350993
public function invalidArgument($method, $argumentName, $argumentValue, $msg = '') {
    return HTTPException::BadRequest('Falscher Parameter '.Code::varInfo($argumentValue).' für '.$method.'( :$'.$argumentName." )\n".$msg.' in Controller: '.Code::getClass($this->controller));
  }
69642
public function callMethod($method, $args)
	{
		$methodDetails = isset($this->methods[$method]) ? $this->methods[$method] : null;
		if (!$methodDetails) {
			throw new Exception("$method does not have an appropriate mapping");
		}

		$body = null;

		// use the method params to try caching the results
		// need to add in the baseUrl we're connecting to, and any global params
		// because the cache might be connecting via different users, and the
		// different users will have different sessions. This might need to be
		// tweaked to handle separate user logins at a later point in time
		$uri = $this->baseUrl . (isset($methodDetails['url']) ? $methodDetails['url'] : '');
		// 	check for any replacements that are required
		if (preg_match_all('/{(\w+)}/', $uri, $matches)) {
			foreach ($matches[1] as $match) {
				if (isset($args[$match])) {
					$uri = str_replace('{'.$match.'}', $args[$match], $uri);
				}
			}
		}

		$cacheKey = md5($uri . $method . var_export($args, true) . var_export($this->globalParams, true));

		$requestType = isset($methodDetails['method']) ? $methodDetails['method'] : 'GET';
		$cache = isset($methodDetails['cache']) ? $methodDetails['cache'] : self::$cache_length;
		if (mb_strtolower($requestType) == 'get' && $cache) {
			$body = CacheService::inst()->get($cacheKey);
		}

		if (!$body) {


			// Note that case is important! Some servers won't respond correctly
			// to get or Get requests
			$requestType = isset($methodDetails['method']) ? $methodDetails['method'] : 'GET';

			$client = $this->getClient($uri);
			$client->setMethod($requestType);

			// set the encoding type
			$client->setEncType(isset($methodDetails['enctype']) ? $methodDetails['enctype'] : Zend_Http_Client::ENC_URLENCODED);

			$paramMethod = $requestType == 'GET' ? 'setParameterGet' : 'setParameterPost';
			if ($this->globalParams) {
				foreach ($this->globalParams as $key => $value) {
					$client->$paramMethod($key, $value);
				}
			}

			if (isset($methodDetails['params'])) {
				$paramNames = $methodDetails['params'];
				foreach ($paramNames as $index => $pname) {

					if (isset($args[$pname])) {
						$client->$paramMethod($pname, $args[$pname]);
					} else if (isset($args[$index])) {
						$client->$paramMethod($pname, $args[$index]);
					}
				}
			}

			if (isset($methodDetails['get'])) {
				foreach ($methodDetails['get'] as $k => $v) {
					$client->setParameterGet($k, $v);
				}
			}

			if (isset($methodDetails['post'])) {
				foreach ($methodDetails['post'] as $k => $v) {
					$client->setParameterPost($k, $v);
				}
			}

			if (isset($methodDetails['raw']) && $methodDetails['raw']) {
				$client->setRawData($args['raw_body']);
			}

			// request away
			$response = $client->request();

			if ($response->isSuccessful()) {
				$body = $response->getBody();
				if ($cache) {
					CacheService::inst()->store($cacheKey, $body, $cache);
				}
			} else {
				if ($response->getStatus() == 500) {
					error_log("Failure: ".$response->getBody());
					error_log(var_export($client, true));
				}
				throw new FailedRequestException("Failed executing $method: ".$response->getMessage()." for request to $uri (".$client->getUri(true).')', $response->getBody());
			}
		}

		$returnType = isset($methodDetails['return']) ? $methodDetails['return'] : 'raw';

		// see what we need to do with it
		if (isset($this->returnHandlers[$returnType])) {
			$handler = $this->returnHandlers[$returnType];
			return $handler->handleReturn($body);
		} else {
			return $body;
		}
	}
5622
protected static function runCallback($method, $args)
	{
		$instance = static::resolveFacadeInstance();

		if(empty($args))
		{
			throw new InvalidArgumentException("Please provide an argument to this method");
			
		}

		switch (count($args))
		{
			case 0:
				return $instance->$method();

			case 1:
				return $instance->$method($args[0]);

			case 2:
				return $instance->$method($args[0], $args[1]);

			case 3:
				return $instance->$method($args[0], $args[1], $args[2]);

			case 4:
				return $instance->$method($args[0], $args[1], $args[2], $args[3]);

			default:
				return call_user_func_array(array($instance, $method), $args);
		}
	}
902057
public function send($method,$arg1="",$arg2="") {

        // if we have a string, send it as well
        if($arg1 != "" && $arg2 != "")
        {
            $command = "$method \"$arg1\" \"$arg2\"";
        }
        elseif($arg1 != "") {
            $command = "$method \"$arg1\"";
        }
        else {
            $command = $method;
        }


        fputs($this->fp,"$command\n"); //Do desired action!
        $c = 0;
        while(!feof($this->fp)) {
            $got =  fgets($this->fp,1024);
            if(strncmp("OK",$got,strlen("OK"))==0)
                break;
            if(strncmp("ACK",$got,strlen("ACK"))==0)
                break;

            $ret[$c]=$got;
            $c++;
        }

        $sentResponse = array(
            "response" => $this->response,
            "got" => $got,
            "ret" => $ret
        );
        return $sentResponse;

    }
979779
public function handle(string $method, array $arguments)
    {
        $upMethod = strtoupper($method);
        $context  = array_shift($arguments);

        if (in_array($upMethod, self::$asynCommand)) {
            $sql = '';
            if ($upMethod == 'GO') {
                if (!empty($arguments[1])) {
                    $sql = trim($arguments[1]);
                } else {
                    $sql = $this->getDBQueryBuilder($context)->getStatement(false);
                }
            }

            if (!empty($sql) && empty($arguments[0]) && !empty($this->slaves)) {
                if (stripos($sql, 'SELECT') === 0 || stripos($sql, 'SHOW') === 0) {
                    $rand     = array_rand($this->slaves);
                    $poolName = $this->slaves[$rand];
                } else {
                    $poolName = $this->master;
                }
            } else {
                $poolName = $this->master;
            }

            $pool = getInstance()->getAsynPool($poolName);
            if ($pool == null) {
                throw new Exception("mysql pool $poolName not register!");
            }
            $this->getDBQueryBuilder($context)->mysqlPool = $pool;
            if (method_exists($this->getDBQueryBuilder(), $method)) {
                return $this->getDBQueryBuilder($context)->{$method}(...$arguments);
            } else {
                array_push($arguments, $context);
                return $this->getDBQueryBuilder($context)->mysqlPool->{$method}(...$arguments);
            }
        }

        $this->getDBQueryBuilder($context)->{$method}(...$arguments);

        return $this->__wrapper;
    }
1013009
public function execute($method, array $options = [], array $arguments = []) {
        $params = [];

        if (count($options) > 0) {
            $params['options'] = $options;
        }

        if (count($arguments) > 0) {
            $params['arguments'] = $arguments;
        }

        $result = $this->api->request(
            $method,
            $params
        );

        if (!array_key_exists('success', $result)) {
            throw new RuntimeException('Missing success status');
        }

        if (!is_bool($result['success']) || $result['success'] === false) {
            throw new RuntimeException('Command failed');
        }

        if (!array_key_exists('output', $result)) {
            throw new RuntimeException('Missing output');
        }

        if (!is_array($result['output'])) {
            throw new RuntimeException('Invalid output');
        }

        return $result['output'];
    }
469965
protected function writeRequest($method, $arguments, callable $callback = null)
    {
        $arguments = Command::normalizeArguments($arguments ?: []);
        $command = $this->client->createCommand($method, $arguments);

        $this->client->executeCommand($command, $callback);
    }
1277618
public function matches($method, $arguments)
    {
        foreach ($this->expectations as $expectation) {
            if ($expectation->matches($method, $arguments)) {
                return true;
            }
        }
        
        return false;
    }
458688
public function request($method = null)
	{
		# Verifying if was set method.
		if (!is_null($method)) $this->setMethod($method);
		
		# Verifying if URI is setted.
		if (is_null($this->uri)) {
			throw new RuntimeException('URI must be set before calling request method.');
		}
		
		# Setting default CURL options
		$this->setCurlOpts($this->defaultCurlOpts);
		
		# Verifying and preparing request for specified method.
		switch ($this->method) {
			case 'GET' : 
				// Specific routines for GET request.
				break;
			case 'POST' :
				$this->setCurlOpts(CURLOPT_POST, true); 
				
				if ($this->useRawData) {
					$this->setCurlOpts(CURLOPT_POSTFIELDS, $this->dataRaw);
				} else {
					// Verifying if has files to send
					if (count($this->files) > 0) {
						foreach ($this->files as $k => $v) {
							// Verifying if PHP version is over 5.4
							if (PHP_VERSION_ID < 50500) {
								$this->setParameterPost($k, "@$v");
							} else {
								$cFile = new CURLFile($v,mime_content_type($v),$k);
								$this->setParameterPost($k, $cFile);
							}
						} 
					}
					$this->setCurlOpts(CURLOPT_POSTFIELDS, $this->paramsPost);
				}
				break;
			case 'PUT' : 
				$this->setCurlOpts(CURLOPT_CUSTOMREQUEST, "PUT");
				if ($this->useRawData) {
					$this->setCurlOpts(CURLOPT_POSTFIELDS, $this->dataRaw);
				} else {
					$data = http_build_query($this->paramsPost);
					$this->setCurlOpts(CURLOPT_POSTFIELDS, $data);
				}
				break;
			case 'DELETE' : 
				$this->setCurlOpts(CURLOPT_CUSTOMREQUEST, "DELETE");
				break;
		}
		
		# Rendering GET parameters into a query string.
		$queryString = (count($this->paramsGet) > 0) ? '?' . http_build_query($this->paramsGet) : '';
		
		# Preparing and setting URI in CURL options
		$uri = $this->uri . $queryString;
		$this->setCurlOpts(CURLOPT_URL, $uri);
		
		# Parsing headers
		$headers = array();
		foreach ($this->headers as $key => $value) {
			$headers[] = $key . ': ' . $value;
		}
		$this->setCurlOpts(CURLOPT_HTTPHEADER, $headers);
		
		# Setting remaining options in CURL
		$this->setCurlOpts(array(
			CURLOPT_HTTP_VERSION=>$this->httpVersion,
		));
		
		# Initializing Request
		$ch = curl_init();
		curl_setopt_array($ch, $this->curlOpts);
		
		# Performing Request
		$response = curl_exec($ch);
		
		# Verifying if request was successfully executed.
		if (!$response) {
			throw new RuntimeException('cURL Request Error: ' . curl_errno($ch));
		}
		
		# Closing handle
		curl_close($ch);
		
		# Verifying if a custom response handler was set
		if (!is_null($this->responseHandler)) {
			$this->response = $this->responseHandler->fromString($response);
		} else {
			$this->response = Response::fromString($response);
		}
		
		# Saving last instance in Client
		$this->lastRequest = clone $this;
		
		# Verifying noReset control var
		if (!$this->noReset) {
			$this->reset();
		}
		
		return $this->response;
	}
110117
public function call(string $method, array $arguments): Response
    {
        try {
            return $this->request('GET', $method, [
                'query' => $arguments
            ]);
        } catch (\Exception $e) {
            throw new ClientException($e->getMessage(), $e->getCode(), $e);
        }
    }
459741
protected function __parseLinkJoin($arguments, $method)
	{
		if(!isset($this->operationOption['join']))
		{
			$this->operationOption['join'] = array();
		}
		array_unshift($arguments,$method);
		$this->operationOption['join'][] = $arguments;
	}
1215313
public function notify($method, array $arguments)
    {
        $message = array(
            'jsonrpc' => self::VERSION,
            'method' => $method
        );

        if ($arguments !== null) {
            $message['params'] = $arguments;
        }

        $this->messages[] = $message;
        return $this;
    }
969667
protected function create(...$arguments)
    {
        $response = null;
        while ($method = $this->methods->next($response)) {
            $response = call_user_func($method, ...$arguments);
        }

        return $response;
    }
1367621
private function call($method, array $args)
    {
        $request = $this->rpcProtocol->encodeRequest($method, $args);

        $response = $this->transport->request($request);

        $response = $this->rpcProtocol->decodeValue($response);

        if ($response instanceof \Exception) {
            throw $response;
        }

        return $response;
    }
26307
protected function invokeMethod($object, $method, array $arguments = array())
    {
        return $this->getReflectionMethod($object, $method)->invokeArgs($object, $arguments);
    }
1225095
public function request($method, $path = null, array $arguments = [], $content = null)
    {
        return $this->requestService->request($method, $this, $path, $arguments, $content);
    }
1048516
public static function request($method, $arguments = array())
    	{
    		// load api key
    		$apiKey = Bootstrap::$bag['config']->getMailer()->getPassword();

    		// determine endpoint
    		$endPoint = 'https://mandrillapp.com/api/1.0/' . $method . '.json';

    		// build payload
    		$arguments['key'] = $apiKey;

    		// setup curl request
    		$ch = curl_init();
    		curl_setopt($ch, CURLOPT_URL, $endPoint);
    		curl_setopt($ch, CURLOPT_TIMEOUT, 30);
    		curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    		curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
    		curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
    		curl_setopt($ch, CURLOPT_POST, true);
    		curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
    		curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($arguments));
    		$response = curl_exec($ch);

    		// catch errors
    		if (curl_errno($ch)) {
    			#$errors = curl_error($ch);
    			curl_close($ch);

    			// return false
    			return false;
    		} else {
    			curl_close($ch);

    			// return array
    			return json_decode($response, true);
    		}
    	}