Uses php_error_docref() instead of _dwavd_error()