zend-patterns / ZendServerSDK

Pure ZF2 CLI for zpk creation and webapi client.
BSD 3-Clause "New" or "Revised" License
22 stars 17 forks source link

[BUG] PHP Errors in zs-client when using key/value output format #74

Closed maxbeutel closed 9 years ago

maxbeutel commented 9 years ago

We noticed that zs-client throws a bunch of errors when using key/value output format.

Also, the servers section from the output is completely missing and only contains the string "Array" as sole value.

I included a sample output here:

$ zs-client vhostGetStatus --vhosts=203  --zskey=admin --zsurl=http://<someHost>/ZendServer/ --zssecret=<secret>  --output-format=kv

PHP Notice:  Array to string conversion in
phar:///usr/local/bin/zs-client/module/Client/Module.php on line 11 PHP
Stack trace:
PHP   1. {main}() /usr/local/bin/zs-client:0
PHP   2. require() /usr/local/bin/zs-client:14
PHP   3. Zend\Mvc\Application->run()
phar:///usr/local/bin/zs-client/index.php:2
PHP   4. Zend\EventManager\EventManager->trigger()
phar:///usr/local/bin/zs-client/vendor/zendframework/zend-mvc/src/Application.php:2
PHP   5. Zend\EventManager\EventManager->triggerListeners()
phar:///usr/local/bin/zs-client/vendor/zendframework/zend-eventmanager/src/EventManager.php:2
PHP   6.
call_user_func:{phar:///usr/local/bin/zs-client/vendor/zendframework/zend-eventmanager/src/EventManager.php:2}()
phar:///usr/local/bin/zs-client/vendor/zendframework/zend-eventmanager/src/EventManager.php:2
PHP   7. Client\Module->preFinish()
phar:///usr/local/bin/zs-client/vendor/zendframework/zend-eventmanager/src/EventManager.php:2

Notice: Array to string conversion in
phar:///usr/local/bin/zs-client/module/Client/Module.php on line 11

Call Stack:
    0.0001     223280   1. {main}() /usr/local/bin/zs-client:0
    0.0100     931960   2.
require('phar:///usr/local/bin/zs-client/index.php')
/usr/local/bin/zs-client:14
    0.1192    8267968   3. Zend\Mvc\Application->run()
phar:///usr/local/bin/zs-client/index.php:2
    2.1534   10591552   4. Zend\EventManager\EventManager->trigger()
phar:///usr/local/bin/zs-client/vendor/zendframework/zend-mvc/src/Application.php:2
    2.1534   10591688   5.
Zend\EventManager\EventManager->triggerListeners()
phar:///usr/local/bin/zs-client/vendor/zendframework/zend-eventmanager/src/EventManager.php:2
    2.1535   10593448   6.
call_user_func:{phar:///usr/local/bin/zs-client/vendor/zendframework/zend-eventmanager/src/EventManager.php:2}()
phar:///usr/local/bin/zs-client/vendor/zendframework/zend-eventmanager/src/EventManager.php:2
    2.1535   10593656   7. Client\Module->preFinish()
phar:///usr/local/bin/zs-client/vendor/zendframework/zend-eventmanager/src/EventManager.php:2

0[id]=203
0[name]=<some name>
0[port]=443
0[status]=Ok
0[default]=0
0[zendDefined]=1
0[zendManaged]=1
0[ssl]=1
0[created]=2015-09-04T12:37:57+02:00
0[lastUpdated]=2015-09-04T12:38:23+02:00
0[createdTimestamp]=1441363077
0[lastUpdatedTimestamp]=1441363103
0[servers]=Array

We also tried with the newest version of zs-client from https://github.com/zend-patterns/ZendServerSDK/commits/master

slaff commented 9 years ago

@maxbeutel Max, check out the new version and give it a try,