Silent failure of add() method in PHP subscriber wrapper class object

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:
array {
    code => '201',
    response => ''
(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>',
            get_class($this), CS_REST_LOG_VERBOSE);

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?

tobyb tobyb, 5 years ago

Hi Van,

That's no good, can you get in touch with support at and we'll take a look at this. Please include you API Key and the code around the failing wrapper call.


200,000 companies around the world can't be wrong.

From Australia to Zimbabwe, and everywhere in between, companies count on 
Campaign Monitor for email campaigns that drive real business results.

Get started for free