nuxeo/nuxeo-automation-php-client — pull request #3 by fredgess (2013-11-19 17:42:42+00:00)
Title: Update NuxeoAutomationAPI.php

Ask if is an array the parameter of NuxeoDocument. The last position of $newDocList[] is a boolean and NuxeoDocument gives a warning.
The sentence each return the current key and value pair from an array and advance the array cursor.
In the next loop $test have an array (the previous position in the array) but current() have a boolean...