mirror of
https://github.com/php/php-src.git
synced 2025-01-26 21:54:16 +08:00
Nuked EOLs from error messages
This commit is contained in:
parent
dde3f89dd4
commit
03cec74a0d
@ -126,7 +126,7 @@ MUTEX_T mx_lock;
|
||||
#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; \
|
||||
@ -139,7 +139,7 @@ MUTEX_T mx_lock;
|
||||
{ \
|
||||
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; \
|
||||
|
@ -3274,7 +3274,7 @@ SSL *php_SSL_new_from_context(SSL_CTX *ctx, php_stream *stream TSRMLS_DC)
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -565,7 +565,7 @@ void ora_do_logon(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
||||
#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;
|
||||
|
@ -792,7 +792,7 @@ static int preg_do_eval(char *eval_str, int eval_str_len, char *subject,
|
||||
/* 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);
|
||||
|
@ -193,7 +193,7 @@ static int ps_files_cleanup_dir(const char *dirname, int maxlifetime TSRMLS_DC)
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -421,7 +421,7 @@ next_iter:
|
||||
}
|
||||
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)) {
|
||||
|
@ -100,7 +100,7 @@ void _php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st) {
|
||||
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.*/
|
||||
@ -119,12 +119,12 @@ void _php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st) {
|
||||
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.*/
|
||||
@ -165,7 +165,7 @@ void _php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st) {
|
||||
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
|
||||
@ -183,7 +183,7 @@ void _php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st) {
|
||||
|
||||
/* 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
|
||||
@ -218,7 +218,7 @@ void _php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st) {
|
||||
|
||||
/* 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());
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
@ -161,7 +161,7 @@ PHP_FUNCTION(assert)
|
||||
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) {
|
||||
|
@ -132,14 +132,14 @@ static void php_stream_apply_filter_list(php_stream *stream, char *filterlist, i
|
||||
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);
|
||||
|
@ -1577,7 +1577,7 @@ static void php_sybase_query (INTERNAL_FUNCTION_PARAMETERS, int buffered)
|
||||
|
||||
/* 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);
|
||||
}
|
||||
@ -1654,7 +1654,7 @@ PHP_FUNCTION(sybase_free_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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user