I have used the PHP subscriber wrapper class to add a test to my client's Campaign Monitor list by placing a modified version of your suggested sample code in a hook that gets call after their forum's "register new member" code.
The forum software sends its email, Campaign Monitor sends a confirmation email, but then the wrapper's add function never returns control to my code. I have logging statements in my hook code, and I turned on VERBOSE logging when I created the Subscriber object. My logging statement immediately after the add() call never gets executed, and the last log statement output to the screen by object's logging is:
code => '201',
response => 'firstname.lastname@example.org'
(except my email address was in the real response.
I traced the code and found that this last logging statement came from this line in the base class's _call() function:
$this->_log->log_message('Call result: <pre>'.var_export($call_result, true).'</pre>',
but after that I get nothing, and there is nothing else in the PHP error log on the client's webserver.
Does anyone have any idea what could be causing this?
That's no good, can you get in touch with support at campaignmonitor.com and we'll take a look at this. Please include you API Key and the code around the failing wrapper call.