cancel
Showing results for 
Search instead for 
Did you mean: 

array_key_exists() warning when sendRequest() on PHP Automation Client

Marc_
Champ on-the-rise
Champ on-the-rise

Hi,

When I execute a query using PHP Automation Client, I receive a warning from a parameter expected in NuxeoAutomationAPI.php.

The code:

$uid = '9dbfxxxx-xxxx-xxxx-xxxx-xxxxxxxx2b64';
$client = new PhpAutomationClient('http://localhost:8080/nuxeo/site/automation');
$session = $client->getSession('Administrator','Administrator');
$answer = $session->newRequest("Document.Query")->set('params', 'query', "SELECT * FROM Document WHERE ecm:uuid = '" . $uid . "'" )->sendRequest();

The warning:

Warning: array_key_exists() expects parameter 2 to be array, boolean given in C:\wamp\www\utils\nuxeo\NuxeoAutomationAPI.php on line 106

I don't understand what happens but I need to avoid this warning, can someone help me about it?,

Thanks in advance!

1 ACCEPTED ANSWER

adam_bo_
Star Contributor
Star Contributor
1 REPLY 1

adam_bo_
Star Contributor
Star Contributor

The problem is the same like in http://answers.nuxeo.com/questions/7353/getdocumentlist-error-on-php-automation-client but you have only one document.