#define CALL_OCI(call) \
{ \
if (OCI(in_call)) { \
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCI8 Recursive call!\n"); \
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCI8 Recursive call!"); \
exit(-1); \
} else { \
OCI(in_call)=1; \
{ \
if (OCI(in_call)) { \
retcode=-1; \
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCI8 Recursive call!\n"); \
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCI8 Recursive call!"); \
exit(-1); \
} else { \
OCI(in_call)=1; \
if (cafile || capath) {
if (!SSL_CTX_load_verify_locations(ctx, cafile, capath)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to set verify locations `%s' `%s'\n", cafile, capath);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to set verify locations `%s' `%s'", cafile, capath);
return NULL;
}
}
#endif
) {
ORA(db_err_conn) = *db_conn;
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Oracle: Connection Failed: %s\n",ora_error(&db_conn->lda));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Oracle: Connection Failed: %s",ora_error(&db_conn->lda));
efree(hashed_details);
efree(db_conn);
RETURN_FALSE;
/* Run the code */
if (zend_eval_string(code.c, &retval, compiled_string_description TSRMLS_CC) == FAILURE) {
efree(compiled_string_description);
- php_error_docref(NULL TSRMLS_CC,E_ERROR, "Failed evaluating code:\n%s", code.c);
+ php_error_docref(NULL TSRMLS_CC,E_ERROR, "Failed evaluating code: %s%s", PHP_EOL, code.c);
/* zend_error() does not return in this case */
}
efree(compiled_string_description);
dir = opendir(dirname);
if (!dir) {
- php_error_docref(NULL TSRMLS_CC, E_NOTICE, "ps_files_cleanup_dir: opendir(%s) failed: %s (%d)\n", dirname, strerror(errno), errno);
+ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "ps_files_cleanup_dir: opendir(%s) failed: %s (%d)", dirname, strerror(errno), errno);
return (0);
}
}
change_node_zval(newnode, value TSRMLS_CC);
} else if (counter > 1) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot assign to an array of nodes (duplicate subnodes or attr detected)\n");
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot assign to an array of nodes (duplicate subnodes or attr detected)");
} else {
if (attribs) {
switch (Z_TYPE_P(value)) {
for the session are also required.
*/
if ((session = SnmpMgrOpen(agent, community, timeout, retries)) == NULL){
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "error on SnmpMgrOpen %d\n", GetLastError());
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "error on SnmpMgrOpen %d", GetLastError());
}
/* Determine and perform the requested operation.*/
if (!SnmpMgrRequest(session, requestType, &variableBindings,
&errorStatus, &errorIndex)){
/* The API is indicating an error. */
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "error on SnmpMgrRequest %d\n", GetLastError());
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "error on SnmpMgrRequest %d", GetLastError());
} else {
/* The API succeeded, errors may be indicated from the remote
agent. */
if (errorStatus > 0){
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error: errorStatus=%d, errorIndex=%d\n",
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error: errorStatus=%d, errorIndex=%d",
errorStatus, errorIndex);
} else {
/* Display the resulting variable bindings.*/
if (!SnmpMgrRequest(session, requestType, &variableBindings,
&errorStatus, &errorIndex)){
/* The API is indicating an error.*/
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "error on SnmpMgrRequest %d\n", GetLastError());
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "error on SnmpMgrRequest %d", GetLastError());
break;
}
else
/* Test for general error conditions or sucesss. */
if (errorStatus > 0){
- php_error_docref(NULL TSRMLS_CC, E_ERROR,"Error: errorStatus=%d, errorIndex=%d \n", errorStatus, errorIndex);
+ php_error_docref(NULL TSRMLS_CC, E_ERROR,"Error: errorStatus=%d, errorIndex=%d", errorStatus, errorIndex);
break;
}
else
/* Close SNMP session with the remote agent.*/
if (!SnmpMgrClose(session)){
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "error on SnmpMgrClose %d\n", GetLastError());
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "error on SnmpMgrClose %d", GetLastError());
}
}
/* }}} */
compiled_string_description = zend_make_compiled_string_description("assert code" TSRMLS_CC);
if (zend_eval_string(myeval, &retval, compiled_string_description TSRMLS_CC) == FAILURE) {
efree(compiled_string_description);
- php_error_docref(NULL TSRMLS_CC, E_ERROR, "Failure evaluating code:\n%s", myeval);
+ php_error_docref(NULL TSRMLS_CC, E_ERROR, "Failure evaluating code: %s%s", PHP_EOL, myeval);
/* php_error_docref() does not return in this case. */
}
if (free_tmp) {
if ((temp_filter = php_stream_filter_create(p, NULL, php_stream_is_persistent(stream) TSRMLS_CC))) {
php_stream_filter_append(&stream->readfilters, temp_filter);
} else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to create filter (%s)\n", p);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to create filter (%s)", p);
}
}
if (write_chain) {
if ((temp_filter = php_stream_filter_create(p, NULL, php_stream_is_persistent(stream) TSRMLS_CC))) {
php_stream_filter_append(&stream->writefilters, temp_filter);
} else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to create filter (%s)\n", p);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to create filter (%s)", p);
}
}
p = php_strtok_r(NULL, "|", &token);
/* Retry deadlocks up until deadlock_retry_count times */
if (sybase_ptr->deadlock && SybCtG(deadlock_retry_count) != -1 && ++deadlock_count > SybCtG(deadlock_retry_count)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Sybase: Retried deadlock %d times [max: %ld], giving up\n", deadlock_count- 1, SybCtG(deadlock_retry_count));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Sybase: Retried deadlock %d times [max: %ld], giving up", deadlock_count- 1, SybCtG(deadlock_retry_count));
if (result != NULL) {
_free_sybase_result(result);
}
/* Did we fetch up until the end? */
if (result->last_retcode != CS_END_DATA && result->last_retcode != CS_END_RESULTS) {
- /* php_error_docref(NULL TSRMLS_CC, E_WARNING, "Sybase: Cancelling the rest of the results\n"); */
+ /* php_error_docref(NULL TSRMLS_CC, E_WARNING, "Sybase: Cancelling the rest of the results"); */
ct_cancel(NULL, result->sybase_ptr->cmd, CS_CANCEL_ALL);
php_sybase_finish_results(result);
}