]> granicus.if.org Git - php/commitdiff
Nuked EOLs from error messages
authorfoobar <sniper@php.net>
Thu, 18 Aug 2005 13:34:04 +0000 (13:34 +0000)
committerfoobar <sniper@php.net>
Thu, 18 Aug 2005 13:34:04 +0000 (13:34 +0000)
ext/oci8/oci8.c
ext/openssl/openssl.c
ext/oracle/oracle.c
ext/pcre/php_pcre.c
ext/session/mod_files.c
ext/simplexml/simplexml.c
ext/snmp/winsnmp.c
ext/standard/assert.c
ext/standard/php_fopen_wrapper.c
ext/sybase_ct/php_sybase_ct.c

index 7b4bdd2e0c53a7781cc6fabb82ae24f5372415b5..9b7c195bc9b142c6f156c9dca86746cf52e23362 100644 (file)
@@ -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; \
index bb9de8c62d538a76727687e20d7348ee7bc564a1..d25ed7f5ee2cc97567fd2a74a49b822d25ff428f 100644 (file)
@@ -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;
                        }
                }
index 0b8a5c81ea273f2997aab1da9cba6f921360fc33..b4100533c59881ab651b87dcbabb17e1e65da71d 100644 (file)
@@ -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;
index a94b8c0e4f38d891e69edef3858c76859b12ddc7..ea539803e1f2de56c8dd5a6ea77f971a1865cf66 100644 (file)
@@ -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);
index f0adfe45513e42729f5199bdaf3e560602589fce..7847313fd921ab02425dd49c43b1ea05de936d54 100644 (file)
@@ -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);
        }
 
index b4f18efdb1e9217b70f1876d399c6ed0d8ea1bd7..b509aa934d5a02fa59a7e3c4e55e302c3a7f6ee0 100644 (file)
@@ -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)) {
index 188d526ff529e3723f0ae2004a7bd262ef1570e1..f4332300a540dc8c9fdedc9b09d47e881ca00a94 100644 (file)
@@ -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());
        }
 }
 /* }}} */
index 7100c5c347147d238f3dd1c4dbba1fbe0c1acad8..1ba0db3ad31e19defa949b52be52b6bb6668e8c1 100644 (file)
@@ -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) {
index 931050dbeff56e1af503e063114abb06560d5091..dec178051de1cb6cc7138506d41474660a2280c5 100644 (file)
@@ -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);
index ce20b9d0d46315b3991d3950e3c3fe5f57a6f140..0442c5a6f2e63e23592c38ce717f190a6b9ad1c5 100644 (file)
@@ -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);
        }