From: Hannes Magnusson Date: Sun, 8 Oct 2006 13:34:24 +0000 (+0000) Subject: Error message clean up X-Git-Tag: RELEASE_1_0_0RC1~1352 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=176b72284c06793e51180eca0a03af1c8691d841;p=php Error message clean up (patch by Matt W (php_lists -AT- realpain.com)) --- diff --git a/ext/bz2/bz2.c b/ext/bz2/bz2.c index 4bb58a3c84..23150e3f28 100644 --- a/ext/bz2/bz2.c +++ b/ext/bz2/bz2.c @@ -374,7 +374,7 @@ static PHP_FUNCTION(bzopen) } if (mode_len != 1 || (mode[0] != 'r' && mode[0] != 'w')) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "'%s' is not a valid mode for bzopen(). Only 'w' and 'r' are supported.", mode); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "'%s' is not a valid mode for bzopen(). Only 'w' and 'r' are supported", mode); RETURN_FALSE; } diff --git a/ext/bz2/bz2_filter.c b/ext/bz2/bz2_filter.c index a3286a3669..eb89fbe40d 100644 --- a/ext/bz2/bz2_filter.c +++ b/ext/bz2/bz2_filter.c @@ -290,7 +290,7 @@ static php_stream_filter *php_bz2_filter_create(const char *filtername, zval *fi /* Create this filter */ data = pecalloc(1, sizeof(php_bz2_filter_data), persistent); if (!data) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed allocating %zu bytes.", sizeof(php_bz2_filter_data)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed allocating %zu bytes", sizeof(php_bz2_filter_data)); return NULL; } @@ -303,14 +303,14 @@ static php_stream_filter *php_bz2_filter_create(const char *filtername, zval *fi data->strm.avail_out = data->outbuf_len = data->inbuf_len = 2048; data->strm.next_in = data->inbuf = (char *) pemalloc(data->inbuf_len, persistent); if (!data->inbuf) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed allocating %zu bytes.", data->inbuf_len); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed allocating %zu bytes", data->inbuf_len); pefree(data, persistent); return NULL; } data->strm.avail_in = 0; data->strm.next_out = data->outbuf = (char *) pemalloc(data->outbuf_len, persistent); if (!data->outbuf) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed allocating %zu bytes.", data->outbuf_len); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed allocating %zu bytes", data->outbuf_len); pefree(data->inbuf, persistent); pefree(data, persistent); return NULL; diff --git a/ext/bz2/tests/001.phpt b/ext/bz2/tests/001.phpt index 47dbfe8499..a8a9815165 100644 --- a/ext/bz2/tests/001.phpt +++ b/ext/bz2/tests/001.phpt @@ -22,7 +22,7 @@ echo "Done\n"; Warning: bzopen() expects exactly 2 parameters, 0 given in %s on line %d NULL -Warning: bzopen(): '' is not a valid mode for bzopen(). Only 'w' and 'r' are supported. in %s on line %d +Warning: bzopen(): '' is not a valid mode for bzopen(). Only 'w' and 'r' are supported in %s on line %d bool(false) Warning: bzopen(): filename cannot be empty in %s on line %d @@ -31,10 +31,10 @@ bool(false) Warning: bzopen(): filename cannot be empty in %s on line %d bool(false) -Warning: bzopen(): 'x' is not a valid mode for bzopen(). Only 'w' and 'r' are supported. in %s on line %d +Warning: bzopen(): 'x' is not a valid mode for bzopen(). Only 'w' and 'r' are supported in %s on line %d bool(false) -Warning: bzopen(): 'rw' is not a valid mode for bzopen(). Only 'w' and 'r' are supported. in %s on line %d +Warning: bzopen(): 'rw' is not a valid mode for bzopen(). Only 'w' and 'r' are supported in %s on line %d bool(false) Warning: bzopen(no_such_file): failed to open stream: No such file or directory in %s on line %d diff --git a/ext/calendar/calendar.c b/ext/calendar/calendar.c index 2bf89d47ba..a3d30ddbb6 100644 --- a/ext/calendar/calendar.c +++ b/ext/calendar/calendar.c @@ -328,7 +328,7 @@ PHP_FUNCTION(cal_info) if (cal != -1 && (cal < 0 || cal >= CAL_NUM_CALS)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid calendar ID %ld.", cal); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid calendar ID %ld", cal); RETURN_FALSE; } @@ -350,7 +350,7 @@ PHP_FUNCTION(cal_days_in_month) } if (cal < 0 || cal >= CAL_NUM_CALS) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid calendar ID %ld.", cal); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid calendar ID %ld", cal); RETURN_FALSE; } @@ -359,7 +359,7 @@ PHP_FUNCTION(cal_days_in_month) sdn_start = calendar->to_jd(year, month, 1); if (sdn_start == 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid date."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid date"); RETURN_FALSE; } @@ -385,7 +385,7 @@ PHP_FUNCTION(cal_to_jd) } if (cal < 0 || cal >= CAL_NUM_CALS) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid calendar ID %ld.", cal); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid calendar ID %ld", cal); RETURN_FALSE; } @@ -615,7 +615,7 @@ PHP_FUNCTION(jdtojewish) RETURN_STRING(date, 1); } else { if (year <= 0 || year > 9999) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Year out of range (0-9999)."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Year out of range (0-9999)"); RETURN_FALSE; } diff --git a/ext/calendar/tests/cal_info.phpt b/ext/calendar/tests/cal_info.phpt index 2e3e612925..edbc12c0e4 100644 --- a/ext/calendar/tests/cal_info.phpt +++ b/ext/calendar/tests/cal_info.phpt @@ -213,4 +213,4 @@ Array [calsymbol] => CAL_JULIAN ) -Warning: cal_info(): invalid calendar ID 99999. in %s on line %d +Warning: cal_info(): invalid calendar ID 99999 in %s on line %d diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 44651999d5..91595bc42b 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -168,7 +168,7 @@ static void _php_curl_close(zend_rsrc_list_entry *rsrc TSRMLS_DC); } \ \ if (php_memnstr(str, tmp_url->path, strlen(tmp_url->path), str + len)) { \ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "URL '%s' contains unencoded control characters.", str); \ + php_error_docref(NULL TSRMLS_CC, E_WARNING, "URL '%s' contains unencoded control characters", str); \ RETURN_FALSE; \ } \ \ @@ -953,7 +953,7 @@ static size_t curl_passwd(void *ctx, char *prompt, char *buf, int buflen) strlcpy(buf, Z_STRVAL_P(retval), Z_STRLEN_P(retval)); } } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "User handler '%s' did not return a string.", Z_STRVAL_P(func)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "User handler '%s' did not return a string", Z_STRVAL_P(func)); } zval_ptr_dtor(&argv[0]); @@ -1602,7 +1602,7 @@ PHP_FUNCTION(curl_setopt_array) zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(arr), &pos); while (zend_hash_get_current_data_ex(Z_ARRVAL_P(arr), (void **)&entry, &pos) == SUCCESS) { if (zend_hash_get_current_key_ex(Z_ARRVAL_P(arr), &string_key, &str_key_len, &option, 0, &pos) == HASH_KEY_IS_STRING) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Array keys must be CURLOPT constants or equivalent interger values."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Array keys must be CURLOPT constants or equivalent integer values"); RETURN_FALSE; } if (_php_curl_setopt(ch, option, entry, return_value TSRMLS_CC)) { diff --git a/ext/date/php_date.c b/ext/date/php_date.c index cbe0d491cd..fb616cb678 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -1139,7 +1139,7 @@ PHP_FUNCTION(idate) ret = php_idate(format[0], ts, 0); if (ret == -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unrecognized date format token."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unrecognized date format token"); RETURN_FALSE; } RETURN_LONG(ret); diff --git a/ext/date/tests/005.phpt b/ext/date/tests/005.phpt index c6551b76b4..7485214d48 100644 --- a/ext/date/tests/005.phpt +++ b/ext/date/tests/005.phpt @@ -27,19 +27,19 @@ bool(false) Warning: idate() expects at most 2 parameters, 3 given in %s on line %d bool(false) -Warning: idate(): Unrecognized date format token. in %s on line %d +Warning: idate(): Unrecognized date format token in %s on line %d bool(false) Warning: idate(): idate format is one char in %s on line %d bool(false) -Warning: idate(): Unrecognized date format token. in %s on line %d +Warning: idate(): Unrecognized date format token in %s on line %d bool(false) int(41) -Warning: idate(): Unrecognized date format token. in %s on line %d +Warning: idate(): Unrecognized date format token in %s on line %d bool(false) -Warning: idate(): Unrecognized date format token. in %s on line %d +Warning: idate(): Unrecognized date format token in %s on line %d bool(false) Done diff --git a/ext/dbase/dbf_rec.c b/ext/dbase/dbf_rec.c index 6e872d3fb7..31a15eded5 100644 --- a/ext/dbase/dbf_rec.c +++ b/ext/dbase/dbf_rec.c @@ -137,7 +137,7 @@ void pack_dbf(dbhead_t *dbh) /* Try to truncate the file to the right size. */ if (ftruncate(dbh->db_fd, out_off) != 0) { TSRMLS_FETCH(); - php_error_docref(NULL TSRMLS_CC, E_WARNING, "dbase_pack() couldn't truncate the file to the right size. Some deleted records may still be left in there."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "dbase_pack() couldn't truncate the file to the right size. Some deleted records may still be left in there"); } if (rec_cnt == 0) diff --git a/ext/dom/document.c b/ext/dom/document.c index 8bebb417e0..92890d0cc2 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -2302,7 +2302,7 @@ PHP_METHOD(domdocument, registerNodeClass) } if (basece == NULL || ! instanceof_function(basece, dom_node_class_entry TSRMLS_CC)) { - php_error_docref(NULL TSRMLS_CC, E_ERROR, "Class %s is not derived from DOMNode.", baseclass); + php_error_docref(NULL TSRMLS_CC, E_ERROR, "Class %s is not derived from DOMNode", baseclass); return; } @@ -2319,11 +2319,11 @@ PHP_METHOD(domdocument, registerNodeClass) DOM_GET_OBJ(docp, id, xmlDocPtr, intern); if (dom_set_doc_classmap(intern->document, basece, ce TSRMLS_CC) == FAILURE) { - php_error_docref(NULL TSRMLS_CC, E_ERROR, "Class %s could not be registered.", extendedclass); + php_error_docref(NULL TSRMLS_CC, E_ERROR, "Class %s could not be registered", extendedclass); } RETURN_TRUE; } else { - php_error_docref(NULL TSRMLS_CC, E_ERROR, "Class %s is not derived from %s.", extendedclass, baseclass); + php_error_docref(NULL TSRMLS_CC, E_ERROR, "Class %s is not derived from %s", extendedclass, baseclass); } RETURN_FALSE; diff --git a/ext/dom/node.c b/ext/dom/node.c index 5bc3cf71f0..1169535ecb 100644 --- a/ext/dom/node.c +++ b/ext/dom/node.c @@ -1736,7 +1736,7 @@ static void dom_canonicalization(INTERNAL_FUNCTION_PARAMETERS, int mode) if (file_type == IS_UNICODE) { efree(file); } - php_error_docref(NULL TSRMLS_CC, E_WARNING, "XPath query did not return a nodeset."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "XPath query did not return a nodeset"); RETURN_FALSE; } } @@ -1835,7 +1835,7 @@ static void dom_canonicalization(INTERNAL_FUNCTION_PARAMETERS, int mode) xmlXPathFreeObject(xpathobjp); } xmlXPathFreeContext(ctxp); - php_error_docref(NULL TSRMLS_CC, E_WARNING, "XPath query did not return a nodeset."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "XPath query did not return a nodeset"); RETURN_FALSE; } } diff --git a/ext/fbsql/php_fbsql.c b/ext/fbsql/php_fbsql.c index 9070fb890d..908af556e4 100644 --- a/ext/fbsql/php_fbsql.c +++ b/ext/fbsql/php_fbsql.c @@ -907,7 +907,7 @@ static void php_fbsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) md = fbcdcRollback(phpLink->connection); if ( !mdOk(phpLink, md, "Rollback;") ) { if (FB_SQL_G(generateWarnings)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "FrontBase link is not connected, ty to reconnect."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "FrontBase link is not connected, ty to reconnect"); } // Make sure select_db will reconnect. fbcmdRelease(md); @@ -1226,11 +1226,11 @@ PHP_FUNCTION(fbsql_set_transaction) } if (Z_LVAL_PP(Locking) < 0 || Z_LVAL_PP(Locking) > 2) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid locking type."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid locking type"); RETURN_FALSE; } if (Z_LVAL_PP(Isolation) < 0 || Z_LVAL_PP(Isolation) > 4) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid isolation type."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid isolation type"); RETURN_FALSE; } diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index 99a953467e..29d1c84f1b 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -810,7 +810,7 @@ ftp_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t type, if (resumepos > 0) { if (resumepos > 2147483647) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "PHP cannot handle files greater than 2147483647 bytes."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "PHP cannot handle files greater than 2147483647 bytes"); goto bail; } sprintf(arg, "%u", resumepos); @@ -907,7 +907,7 @@ ftp_put(ftpbuf_t *ftp, const char *path, php_stream *instream, ftptype_t type, i if (startpos > 0) { if (startpos > 2147483647) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "PHP cannot handle files with a size greater than 2147483647 bytes."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "PHP cannot handle files with a size greater than 2147483647 bytes"); goto bail; } sprintf(arg, "%u", startpos); @@ -1598,7 +1598,7 @@ ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path TSRMLS_DC) if ((tmpstream = php_stream_fopen_tmpfile()) == NULL) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to create temporary file. Check permissions in temporary files directory."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to create temporary file. Check permissions in temporary files directory"); return NULL; } @@ -1706,7 +1706,7 @@ ftp_nb_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t typ * since php is 32 bit by design, we bail out with warning */ if (resumepos > 2147483647) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "PHP cannot handle files greater than 2147483648 bytes."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "PHP cannot handle files greater than 2147483648 bytes"); goto bail; } sprintf(arg, "%u", resumepos); @@ -1824,7 +1824,7 @@ ftp_nb_put(ftpbuf_t *ftp, const char *path, php_stream *instream, ftptype_t type } if (startpos > 0) { if (startpos > 2147483647) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "PHP cannot handle files with a size greater than 2147483647 bytes."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "PHP cannot handle files with a size greater than 2147483647 bytes"); goto bail; } sprintf(arg, "%u", startpos); diff --git a/ext/ftp/php_ftp.c b/ext/ftp/php_ftp.c index a8d9f43b6a..cc63b6a5cc 100644 --- a/ext/ftp/php_ftp.c +++ b/ext/ftp/php_ftp.c @@ -1024,7 +1024,7 @@ PHP_FUNCTION(ftp_nb_continue) ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); if (!ftp->nb) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "no nbronous transfer to continue."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "no nbronous transfer to continue"); RETURN_LONG(PHP_FTP_FAILED); } diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index db4e7dae16..7df2240f95 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -2007,7 +2007,7 @@ PHP_FUNCTION(iconv_strpos) } if (offset < 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset not contained in string."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset not contained in string"); RETURN_FALSE; } diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 0c7f768dfe..bed1d0aed2 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -3221,7 +3221,7 @@ PHP_FUNCTION(imap_mail_compose) } if (bod && bod->type == TYPEMULTIPART && (!bod->nested.part || !bod->nested.part->next)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "cannot generate multipart e-mail without components."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "cannot generate multipart e-mail without components"); RETVAL_FALSE; goto done; } diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index ef7ee4fe22..cf7e9529c5 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -893,11 +893,11 @@ static void php_ldap_do_search(INTERNAL_FUNCTION_PARAMETERS, int scope) RETVAL_FALSE; } else { if (errno == LDAP_SIZELIMIT_EXCEEDED) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Partial search results returned: Sizelimit exceeded."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Partial search results returned: Sizelimit exceeded"); } #ifdef LDAP_ADMINLIMIT_EXCEEDED else if (errno == LDAP_ADMINLIMIT_EXCEEDED) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Partial search results returned: Adminlimit exceeded."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Partial search results returned: Adminlimit exceeded"); } #endif diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index eb657eb0ef..df5cd861d3 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -967,14 +967,14 @@ PHP_RINIT_FUNCTION(mbstring) zend_hash_find(EG(function_table), p->ovld_func, strlen(p->ovld_func)+1 , (void **)&func); if (zend_hash_find(EG(function_table), p->orig_func, strlen(p->orig_func)+1, (void **)&orig) != SUCCESS) { - php_error_docref("ref.mbstring" TSRMLS_CC, E_WARNING, "mbstring couldn't find function %s.", p->orig_func); + php_error_docref("ref.mbstring" TSRMLS_CC, E_WARNING, "mbstring couldn't find function %s", p->orig_func); return FAILURE; } else { zend_hash_add(EG(function_table), p->save_func, strlen(p->save_func)+1, orig, sizeof(zend_function), NULL); if (zend_hash_update(EG(function_table), p->orig_func, strlen(p->orig_func)+1, func, sizeof(zend_function), NULL) == FAILURE) { - php_error_docref("ref.mbstring" TSRMLS_CC, E_WARNING, "mbstring couldn't replace function %s.", p->orig_func); + php_error_docref("ref.mbstring" TSRMLS_CC, E_WARNING, "mbstring couldn't replace function %s", p->orig_func); return FAILURE; } } @@ -1341,7 +1341,7 @@ PHP_FUNCTION(mb_substitute_character) MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR; MBSTRG(current_filter_illegal_substchar) = Z_LVAL_PP(arg1); } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown character."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown character"); RETVAL_FALSE; } } @@ -1352,7 +1352,7 @@ PHP_FUNCTION(mb_substitute_character) MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR; MBSTRG(current_filter_illegal_substchar) = Z_LVAL_PP(arg1); } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown character."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown character"); RETVAL_FALSE; } break; @@ -1615,16 +1615,16 @@ PHP_FUNCTION(mb_strpos) case 1: break; case 2: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Needle has not positive length."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Needle has non-positive length"); break; case 4: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown encoding or conversion error."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown encoding or conversion error"); break; case 8: - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Argument is empty."); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Argument is empty"); break; default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown error in mb_strpos."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown error in mb_strpos"); break; } RETVAL_FALSE; diff --git a/ext/mcrypt/mcrypt.c b/ext/mcrypt/mcrypt.c index afee47e99a..df0b6b705e 100644 --- a/ext/mcrypt/mcrypt.c +++ b/ext/mcrypt/mcrypt.c @@ -226,7 +226,7 @@ ZEND_GET_MODULE(mcrypt) #define PHP_MCRYPT_INIT_CHECK \ if (!pm->init) { \ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Operation disallowed prior to mcrypt_generic_init()."); \ + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Operation disallowed prior to mcrypt_generic_init()"); \ RETURN_FALSE; \ } \ diff --git a/ext/mcrypt/tests/bug35496.phpt b/ext/mcrypt/tests/bug35496.phpt index 9d94ba4ca9..de4b9ad94d 100644 --- a/ext/mcrypt/tests/bug35496.phpt +++ b/ext/mcrypt/tests/bug35496.phpt @@ -9,6 +9,6 @@ mcrypt_generic($td, "foobar"); mdecrypt_generic($td, "baz"); ?> --EXPECTF-- -Warning: mcrypt_generic(): Operation disallowed prior to mcrypt_generic_init(). in %s/bug35496.php on line 3 +Warning: mcrypt_generic(): Operation disallowed prior to mcrypt_generic_init() in %s/bug35496.php on line 3 -Warning: mdecrypt_generic(): Operation disallowed prior to mcrypt_generic_init(). in %s/bug35496.php on line 4 +Warning: mdecrypt_generic(): Operation disallowed prior to mcrypt_generic_init() in %s/bug35496.php on line 4 diff --git a/ext/mime_magic/mime_magic.c b/ext/mime_magic/mime_magic.c index 12c12f6d7a..958501cc24 100644 --- a/ext/mime_magic/mime_magic.c +++ b/ext/mime_magic/mime_magic.c @@ -1228,7 +1228,7 @@ static int fsmagic(zval *what TSRMLS_DC) break; default: if(MIME_MAGIC_G(debug)) - php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid mode 0%o.", (unsigned int)stat_ssb.sb.st_mode); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid mode 0%o", (unsigned int)stat_ssb.sb.st_mode); return MIME_MAGIC_ERROR; } @@ -1631,7 +1631,7 @@ static int mcheck(union VALUETYPE *p, struct magic *m) default: /* bogosity, pretend that it just wasn't a match */ if(MIME_MAGIC_G(debug)) - php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid type %d in mcheck().", m->type); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid type %d in mcheck()", m->type); return 0; } @@ -1680,7 +1680,7 @@ static int mcheck(union VALUETYPE *p, struct magic *m) /* bogosity, pretend it didn't match */ matched = 0; if(MIME_MAGIC_G(debug)) - php_error_docref(NULL TSRMLS_CC, E_WARNING, "mcheck: can't happen: invalid relation %d.", m->reln); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "mcheck: can't happen: invalid relation %d", m->reln); break; } @@ -1765,7 +1765,7 @@ static void mprint(union VALUETYPE *p, struct magic *m) { TSRMLS_FETCH(); if(MIME_MAGIC_G(debug)) - php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid m->type (%d) in mprint().", m->type); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid m->type (%d) in mprint()", m->type); return; } } @@ -1813,7 +1813,7 @@ static int mconvert(union VALUETYPE *p, struct magic *m) { TSRMLS_FETCH(); if(MIME_MAGIC_G(debug)) - php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid type %d in mconvert().", m->type); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid type %d in mconvert()", m->type); return 0; } } diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c index 91c71c2378..b4485d11b0 100644 --- a/ext/mysql/php_mysql.c +++ b/ext/mysql/php_mysql.c @@ -1240,9 +1240,9 @@ static void php_mysql_do_query_general(zval **query, zval **mysql_link, int link mysql_result = mysql_use_result(&mysql->conn); while ((row = mysql_fetch_row(mysql_result))) { if (!strcmp("ALL", row[1])) { - php_error_docref("http://www.mysql.com/doc" TSRMLS_CC, E_WARNING, "Your query requires a full tablescan (table %s, %s rows affected). Use EXPLAIN to optimize your query.", row[0], row[6]); + php_error_docref("http://www.mysql.com/doc" TSRMLS_CC, E_WARNING, "Your query requires a full tablescan (table %s, %s rows affected). Use EXPLAIN to optimize your query", row[0], row[6]); } else if (!strcmp("INDEX", row[1])) { - php_error_docref("http://www.mysql.com/doc" TSRMLS_CC, E_WARNING, "Your query requires a full indexscan (table %s, %s rows affected). Use EXPLAIN to optimize your query.", row[0], row[6]); + php_error_docref("http://www.mysql.com/doc" TSRMLS_CC, E_WARNING, "Your query requires a full indexscan (table %s, %s rows affected). Use EXPLAIN to optimize your query", row[0], row[6]); } } mysql_free_result(mysql_result); @@ -1368,7 +1368,7 @@ PHP_FUNCTION(mysql_db_query) /* FIXME: Unicode support??? */ if (MySG(trace_mode) || !strcasecmp(get_active_function_name(TSRMLS_C).s, "mysql")) { - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "This function is deprecated; use mysql_query() instead."); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "This function is deprecated; use mysql_query() instead"); } php_mysql_do_query_general(query, mysql_link, id, db, MYSQL_STORE_RESULT, return_value TSRMLS_CC); @@ -1667,7 +1667,7 @@ PHP_FUNCTION(mysql_escape_string) Z_TYPE_P(return_value) = IS_STRING; if (MySG(trace_mode)){ - php_error_docref("function.mysql-real-escape-string" TSRMLS_CC, E_WARNING, "This function is deprecated; use mysql_real_escape_string() instead."); + php_error_docref("function.mysql-real-escape-string" TSRMLS_CC, E_WARNING, "This function is deprecated; use mysql_real_escape_string() instead"); } } @@ -1930,7 +1930,7 @@ static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type, } if ((result_type & MYSQL_BOTH) == 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "The result type should be either MYSQL_NUM, MYSQL_ASSOC or MYSQL_BOTH."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "The result type should be either MYSQL_NUM, MYSQL_ASSOC or MYSQL_BOTH"); } ZEND_FETCH_RESOURCE(mysql_result, MYSQL_RES *, result, -1, "MySQL result", le_result); diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index bbbb5ce170..152c02e4f4 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -241,7 +241,7 @@ PHP_FUNCTION(mysqli_stmt_bind_result) var_cnt = argc - start; if (var_cnt != mysql_stmt_field_count(stmt->stmt)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number of bind variables doesn't match number of fields in prepared statement."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number of bind variables doesn't match number of fields in prepared statement"); efree(args); RETURN_FALSE; } diff --git a/ext/oci8/oci8_lob.c b/ext/oci8/oci8_lob.c index d219009bda..39aae293f2 100644 --- a/ext/oci8/oci8_lob.c +++ b/ext/oci8/oci8_lob.c @@ -62,7 +62,7 @@ php_oci_descriptor *php_oci_lob_create (php_oci_connection *connection, long typ /* these three are allowed */ break; default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown descriptor type %ld.", type); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown descriptor type %ld", type); return NULL; break; } diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index 6cdfe85394..e244e304d5 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -2988,7 +2988,7 @@ PHP_FUNCTION(openssl_sign) mdtype = php_openssl_get_evp_md_from_algo(signature_algo); if (!mdtype) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown signature algorithm."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown signature algorithm"); RETURN_FALSE; } @@ -3032,7 +3032,7 @@ PHP_FUNCTION(openssl_verify) mdtype = php_openssl_get_evp_md_from_algo(signature_algo); if (!mdtype) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown signature algorithm."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown signature algorithm"); RETURN_FALSE; } diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 00bac77193..cb49d88f89 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -1373,7 +1373,7 @@ static void preg_replace_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_callabl } if (!is_callable_replace && Z_TYPE_P(replace) == IS_ARRAY && Z_TYPE_P(regex) != IS_ARRAY) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Parameter mismatch, pattern is a string while replacement in an array."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Parameter mismatch, pattern is a string while replacement in an array"); RETURN_FALSE; } diff --git a/ext/pcre/tests/preg_replace2.phpt b/ext/pcre/tests/preg_replace2.phpt index 2c076e7ebc..e2863d8ffb 100644 --- a/ext/pcre/tests/preg_replace2.phpt +++ b/ext/pcre/tests/preg_replace2.phpt @@ -16,7 +16,7 @@ echo "==done==\n"; ?> --EXPECTF-- -Warning: preg_replace(): Parameter mismatch, pattern is a string while replacement in an array. in %spreg_replace2.php on line 3 +Warning: preg_replace(): Parameter mismatch, pattern is a string while replacement in an array in %spreg_replace2.php on line 3 bool(false) string(1) "c" array(3) { @@ -41,7 +41,7 @@ array(2) { } ==done== --UEXPECTF-- -Warning: preg_replace(): Parameter mismatch, pattern is a string while replacement in an array. in %s on line %d +Warning: preg_replace(): Parameter mismatch, pattern is a string while replacement in an array in %s on line %d bool(false) unicode(1) "c" array(3) { diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index f6558f7fa7..5bf3683b70 100755 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -1151,7 +1151,7 @@ int pdo_hash_methods(pdo_dbh_t *dbh, int kind TSRMLS_DC) } if (!(dbh->cls_methods[kind] = pemalloc(sizeof(HashTable), dbh->is_persistent))) { - php_error_docref(NULL TSRMLS_CC, E_ERROR, "out of memory while allocating PDO methods."); + php_error_docref(NULL TSRMLS_CC, E_ERROR, "out of memory while allocating PDO methods"); } zend_hash_init_ex(dbh->cls_methods[kind], 8, NULL, NULL, dbh->is_persistent, 0); diff --git a/ext/pspell/pspell.c b/ext/pspell/pspell.c index 9b09680a60..89d63609e4 100644 --- a/ext/pspell/pspell.c +++ b/ext/pspell/pspell.c @@ -246,7 +246,7 @@ static PHP_FUNCTION(pspell_new) delete_pspell_config(config); if(pspell_error_number(ret) != 0){ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "PSPELL couldn't open the dictionary. reason: %s ", pspell_error_message(ret)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "PSPELL couldn't open the dictionary. reason: %s", pspell_error_message(ret)); RETURN_FALSE; } @@ -358,7 +358,7 @@ static PHP_FUNCTION(pspell_new_personal) delete_pspell_config(config); if(pspell_error_number(ret) != 0){ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "PSPELL couldn't open the dictionary. reason: %s ", pspell_error_message(ret)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "PSPELL couldn't open the dictionary. reason: %s", pspell_error_message(ret)); RETURN_FALSE; } @@ -391,7 +391,7 @@ static PHP_FUNCTION(pspell_new_config) ret = new_pspell_manager(config); if(pspell_error_number(ret) != 0){ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "PSPELL couldn't open the dictionary. reason: %s ", pspell_error_message(ret)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "PSPELL couldn't open the dictionary. reason: %s", pspell_error_message(ret)); RETURN_FALSE; } @@ -456,7 +456,7 @@ static PHP_FUNCTION(pspell_suggest) } delete_pspell_string_emulation(els); }else{ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "PSPELL had a problem. details: %s ", pspell_manager_error_message(manager)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "PSPELL had a problem. details: %s", pspell_manager_error_message(manager)); RETURN_FALSE; } } diff --git a/ext/pspell/tests/003.phpt b/ext/pspell/tests/003.phpt index 46d11fcc98..a95b84abe3 100644 --- a/ext/pspell/tests/003.phpt +++ b/ext/pspell/tests/003.phpt @@ -29,7 +29,7 @@ var_dump(pspell_config_ignore($cfg, PHP_INT_MAX)); --EXPECTF-- bool(false) -Warning: pspell_new_config(): PSPELL couldn't open the dictionary. reason: The encoding "b0rked" is not known. This could also mean that the file "%s/b0rked.%s" could not be opened for reading or does not exist. in %s003.php on line 9 +Warning: pspell_new_config(): PSPELL couldn't open the dictionary. reason: The encoding "b0rked" is not known. This could also mean that the file "%s/b0rked.%s" could not be opened for reading or does not exist. in %s003.php on line 9 Warning: pspell_check(): 0 is not a PSPELL result index in %s003.php on line 10 bool(false) diff --git a/ext/pspell/tests/005.phpt b/ext/pspell/tests/005.phpt index 8aeb206031..17ed1904b8 100644 --- a/ext/pspell/tests/005.phpt +++ b/ext/pspell/tests/005.phpt @@ -33,7 +33,7 @@ var_dump(strpos(file_get_contents("$wordlist.tmp"), 'ola') !== FALSE); unlink("$wordlist.tmp"); ?> --EXPECTF-- -Warning: pspell_new_personal(): PSPELL couldn't open the dictionary. reason: The file "%s005.php" is not in the proper format. in %s005.php on line 5 +Warning: pspell_new_personal(): PSPELL couldn't open the dictionary. reason: The file "%s005.php" is not in the proper format. in %s005.php on line 5 bool(false) bool(true) -- diff --git a/ext/recode/recode.c b/ext/recode/recode.c index cb9ad7d492..8368246dde 100644 --- a/ext/recode/recode.c +++ b/ext/recode/recode.c @@ -154,7 +154,7 @@ PHP_FUNCTION(recode_string) recode_buffer_to_buffer(request, str, str_len, &r, &r_len, &r_alen); if (!r) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Recoding failed."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Recoding failed"); error_exit: RETVAL_FALSE; } else { @@ -207,7 +207,7 @@ PHP_FUNCTION(recode_file) } if (!recode_file_to_file(request, in_fp, out_fp)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Recoding failed."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Recoding failed"); goto error_exit; } diff --git a/ext/session/session.c b/ext/session/session.c index 11324b5b67..41f321c5f6 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -83,7 +83,7 @@ static PHP_GINIT_FUNCTION(ps); #define SESSION_CHECK_ACTIVE_STATE \ if (PS(session_status) == php_session_active) { \ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "A session is active. You cannot change the session module's ini settings at this time."); \ + php_error_docref(NULL TSRMLS_CC, E_WARNING, "A session is active. You cannot change the session module's ini settings at this time"); \ return FAILURE; \ } \ @@ -505,13 +505,13 @@ static char *php_session_encode(int *newlen TSRMLS_DC) IF_SESSION_VARS() { if (!PS(serializer)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown session.serialize_handler. Failed to encode session object."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown session.serialize_handler. Failed to encode session object"); ret = NULL; } else if (PS(serializer)->encode(&ret, newlen TSRMLS_CC) == FAILURE) ret = NULL; } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot encode non-existent session."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot encode non-existent session"); } return ret; @@ -520,12 +520,12 @@ static char *php_session_encode(int *newlen TSRMLS_DC) static void php_session_decode(const char *val, int vallen TSRMLS_DC) { if (!PS(serializer)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown session.serialize_handler. Failed to decode session object."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown session.serialize_handler. Failed to decode session object"); return; } if (PS(serializer)->decode(val, vallen TSRMLS_CC) == FAILURE) { php_session_destroy(TSRMLS_C); - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to decode session object. Session has been destroyed."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to decode session object. Session has been destroyed"); } } @@ -688,7 +688,7 @@ static void php_session_initialize(TSRMLS_D) } if (!PS(mod)) { - php_error_docref(NULL TSRMLS_CC, E_ERROR, "No storage module chosen - failed to initialize session."); + php_error_docref(NULL TSRMLS_CC, E_ERROR, "No storage module chosen - failed to initialize session"); return; } @@ -751,7 +751,7 @@ static int migrate_global(HashTable *ht, HashPosition *pos TSRMLS_DC) case HASH_KEY_IS_LONG: php_error_docref(NULL TSRMLS_CC, E_NOTICE, "The session bug compatibility code will not " "try to locate the global variable $%lu due to its " - "numeric nature.", num_key); + "numeric nature", num_key); break; } diff --git a/ext/session/tests/014.phpt b/ext/session/tests/014.phpt index 297a885ccb..66eecb1bdd 100644 --- a/ext/session/tests/014.phpt +++ b/ext/session/tests/014.phpt @@ -32,8 +32,8 @@ session_destroy(); --EXPECTF-- -Warning: ini_set(): A session is active. You cannot change the session module's ini settings at this time. in %s on line %d +Warning: ini_set(): A session is active. You cannot change the session module's ini settings at this time in %s on line %d -Warning: ini_set(): A session is active. You cannot change the session module's ini settings at this time. in %s on line %d +Warning: ini_set(): A session is active. You cannot change the session module's ini settings at this time in %s on line %d diff --git a/ext/soap/soap.c b/ext/soap/soap.c index 80bcfd0a27..d36275834b 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -897,7 +897,7 @@ PHP_METHOD(SoapParam, SoapParam) php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid parameters"); } if (name_length == 0) { - php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid parameters. Invalid parameter name."); + php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid parameters. Invalid parameter name"); } if (name_type == IS_STRING) { @@ -926,10 +926,10 @@ PHP_METHOD(SoapHeader, SoapHeader) php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid parameters"); } if (ns_len == 0) { - php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid parameters. Invalid namespace."); + php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid parameters. Invalid namespace"); } if (name_len == 0) { - php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid parameters. Invalid header name."); + php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid parameters. Invalid header name"); } if (ns_type == IS_STRING) { @@ -957,7 +957,7 @@ PHP_METHOD(SoapHeader, SoapHeader) } else if (Z_TYPE_P(actor) == IS_UNICODE && Z_USTRLEN_P(actor) > 0) { add_property_unicodel(this_ptr, "actor", Z_USTRVAL_P(actor), Z_USTRLEN_P(actor), 1); } else { - php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid parameters. Invalid actor."); + php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid parameters. Invalid actor"); } } @@ -998,13 +998,13 @@ PHP_METHOD(SoapFault, SoapFault) fault_code_ns = soap_encode_string(*t_ns, NULL TSRMLS_CC); fault_code = soap_encode_string(*t_code, NULL TSRMLS_CC); } else { - php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid parameters. Invalid fault code."); + php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid parameters. Invalid fault code"); } } else { - php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid parameters. Invalid fault code."); + php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid parameters. Invalid fault code"); } if (fault_code != NULL && !fault_code[0]) { - php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid parameters. Invalid fault code."); + php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid parameters. Invalid fault code"); } if (name.v != NULL && name_len == 0) { name.v = NULL; @@ -1352,7 +1352,7 @@ PHP_METHOD(SoapServer, SoapServer) } encoding = xmlFindCharEncodingHandler(str); if (encoding == NULL) { - php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid arguments. Invalid 'encoding' option - '%v'.", Z_TYPE_PP(tmp), Z_UNIVAL_PP(tmp)); + php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid arguments. Invalid 'encoding' option - '%v'", Z_TYPE_PP(tmp), Z_UNIVAL_PP(tmp)); } else { service->encoding = encoding; } @@ -1388,7 +1388,7 @@ PHP_METHOD(SoapServer, SoapServer) } if (wsdl == NULL && service->uri == NULL) { - php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid arguments. 'uri' option is required in nonWSDL mode."); + php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid arguments. 'uri' option is required in nonWSDL mode"); return; } @@ -2682,7 +2682,7 @@ PHP_METHOD(SoapClient, SoapClient) } encoding = xmlFindCharEncodingHandler(str); if (encoding == NULL) { - php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid arguments. Invalid 'encoding' option - '%v'.", Z_TYPE_PP(tmp), Z_UNIVAL_PP(tmp)); + php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid arguments. Invalid 'encoding' option - '%v'", Z_TYPE_PP(tmp), Z_UNIVAL_PP(tmp)); } else { client->encoding = encoding; } diff --git a/ext/soap/tests/bugs/bug31755.phpt b/ext/soap/tests/bugs/bug31755.phpt index b97f83bbf5..872e2de572 100644 --- a/ext/soap/tests/bugs/bug31755.phpt +++ b/ext/soap/tests/bugs/bug31755.phpt @@ -14,4 +14,4 @@ $response= $client->__call('function', array(), null, $header); print $client->__getLastRequest(); ?> --EXPECTF-- -Fatal error: SoapHeader::__construct(): Invalid parameters. Invalid namespace. in %s on line %d +Fatal error: SoapHeader::__construct(): Invalid parameters. Invalid namespace in %s on line %d diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index 37c9af90cd..e44fd24488 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -397,7 +397,7 @@ static int php_set_inet6_addr(struct sockaddr_in6 *sin6, char *string, php_socke #else /* No IPv6 specific hostname resolution is available on this system? */ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Host lookup failed: getaddrinfo() not available on this system."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Host lookup failed: getaddrinfo() not available on this system"); return 0; #endif diff --git a/ext/sqlite/sqlite.c b/ext/sqlite/sqlite.c index 6e1c71e32e..de109c1759 100644 --- a/ext/sqlite/sqlite.c +++ b/ext/sqlite/sqlite.c @@ -172,7 +172,7 @@ PHP_INI_END() #define PHP_SQLITE_EMPTY_QUERY \ if (!sql_len) { \ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot execute empty query."); \ + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot execute empty query"); \ RETURN_FALSE; \ } diff --git a/ext/standard/array.c b/ext/standard/array.c index 073f88cbd5..7af5ad6a95 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -599,7 +599,7 @@ static int array_user_compare(const void *a, const void *b TSRMLS_DC) /* check if comparison function is valid */ #define PHP_ARRAY_CMP_FUNC_CHECK(func_name) \ if (!zend_is_callable(*func_name, 0, NULL)) { \ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid comparison function."); \ + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid comparison function"); \ BG(user_compare_fci) = old_user_compare_fci; \ BG(user_compare_fci_cache) = old_user_compare_fci_cache; \ RETURN_FALSE; \ @@ -3003,7 +3003,7 @@ static void php_array_intersect(INTERNAL_FUNCTION_PARAMETERS, int behavior, int fci_key = &fci2; fci_key_cache = &fci2_cache; } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "data_compare_type is %d. key_compare_type is %d. This should never happen. Please report as a bug.", data_compare_type, key_compare_type); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "data_compare_type is %d. key_compare_type is %d. This should never happen. Please report as a bug", data_compare_type, key_compare_type); return; } diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 579f6cef06..1b0228ba3b 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -4427,7 +4427,7 @@ PHP_FUNCTION(putenv) } } - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid parameter syntax."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid parameter syntax"); RETURN_FALSE; } /* }}} */ @@ -4741,7 +4741,7 @@ PHP_FUNCTION(time_sleep_until) c_ts = (double)(d_ts - tm.tv_sec - tm.tv_usec / 1000000.00); if (c_ts < 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Sleep until to time is less than current time."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Sleep until to time is less than current time"); RETURN_FALSE; } @@ -6226,11 +6226,11 @@ static int copy_request_variable(void *pDest, int num_args, va_list args, zend_h if (!prefix_len) { if (!hash_key->nKeyLength) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Numeric key detected - possible security hazard."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Numeric key detected - possible security hazard"); return 0; } else if (hash_key->nKeyLength == sizeof("GLOBALS") && ZEND_U_EQUAL(hash_key->type, hash_key->arKey, hash_key->nKeyLength-1, "GLOBALS", sizeof("GLOBALS")-1)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Attempted GLOBALS variable overwrite."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Attempted GLOBALS variable overwrite"); return 0; } } diff --git a/ext/standard/browscap.c b/ext/standard/browscap.c index 33cd7cd366..022e6241b7 100644 --- a/ext/standard/browscap.c +++ b/ext/standard/browscap.c @@ -290,7 +290,7 @@ PHP_FUNCTION(get_browser) char *browscap = INI_STR("browscap"); if (!browscap || !browscap[0]) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "browscap ini directive not set."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "browscap ini directive not set"); RETURN_FALSE; } diff --git a/ext/standard/dl.c b/ext/standard/dl.c index 5f2539d066..85869bf92d 100644 --- a/ext/standard/dl.c +++ b/ext/standard/dl.c @@ -141,7 +141,7 @@ void php_dl(zval *file, int type, zval *return_value, int start_now TSRMLS_DC) if (!get_module) { DL_UNLOAD(handle); - php_error_docref(NULL TSRMLS_CC, error_type, "Invalid library (maybe not a PHP library) '%s' ", Z_STRVAL_P(file)); + php_error_docref(NULL TSRMLS_CC, error_type, "Invalid library (maybe not a PHP library) '%s'", Z_STRVAL_P(file)); RETURN_FALSE; } module_entry = get_module(); diff --git a/ext/standard/exec.c b/ext/standard/exec.c index 12d48c6cb8..b57067526a 100644 --- a/ext/standard/exec.c +++ b/ext/standard/exec.c @@ -485,7 +485,7 @@ PHP_FUNCTION(proc_nice) errno = 0; nice(pri); if (errno) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Only a super user may attempt to increase the priority of a process."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Only a super user may attempt to increase the priority of a process"); RETURN_FALSE; } diff --git a/ext/standard/file.c b/ext/standard/file.c index 76b6e3e2c9..25646e3f25 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -556,7 +556,7 @@ PHP_FUNCTION(file_get_contents) } if (offset > 0 && php_stream_seek(stream, offset, SEEK_SET) < 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to seek to position %ld in the stream.", offset); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to seek to position %ld in the stream", offset); RETURN_FALSE; } diff --git a/ext/standard/filters.c b/ext/standard/filters.c index 6ba6537e21..cd17f2fe32 100644 --- a/ext/standard/filters.c +++ b/ext/standard/filters.c @@ -1961,7 +1961,7 @@ static php_stream_filter *consumed_filter_create(const char *filtername, zval *f /* Create this filter */ data = pecalloc(1, sizeof(php_consumed_filter_data), persistent); if (!data) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed allocating %zd bytes.", sizeof(php_consumed_filter_data)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed allocating %zd bytes", sizeof(php_consumed_filter_data)); return NULL; } data->persistent = persistent; diff --git a/ext/standard/http.c b/ext/standard/http.c index 76a6f08fc0..1dd47d6cfa 100644 --- a/ext/standard/http.c +++ b/ext/standard/http.c @@ -80,7 +80,7 @@ PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, } if (zend_hash_get_current_data_ex(ht, (void **)&zdata, NULL) == FAILURE || !zdata || !(*zdata)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error traversing form data array."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error traversing form data array"); return FAILURE; } if (Z_TYPE_PP(zdata) == IS_ARRAY || Z_TYPE_PP(zdata) == IS_OBJECT) { @@ -207,7 +207,7 @@ PHP_FUNCTION(http_build_query) } if (Z_TYPE_P(formdata) != IS_ARRAY && Z_TYPE_P(formdata) != IS_OBJECT) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Parameter 1 expected to be Array or Object. Incorrect value given."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Parameter 1 expected to be Array or Object. Incorrect value given"); RETURN_FALSE; } diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index ee3e39af70..0d9b7057fd 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -150,7 +150,7 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path, tmp_line[0] = '\0'; if (redirect_max < 1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Redirection limit reached, aborting."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Redirection limit reached, aborting"); return NULL; } diff --git a/ext/standard/image.c b/ext/standard/image.c index 7476ed17f6..13c1dc2d1d 100644 --- a/ext/standard/image.c +++ b/ext/standard/image.c @@ -1349,7 +1349,7 @@ PHP_FUNCTION(getimagesize) #if HAVE_ZLIB && !defined(COMPILE_DL_ZLIB) result = php_handle_swc(stream TSRMLS_CC); #else - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "The image is a compressed SWF file, but you do not have a static version of the zlib extension enabled."); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "The image is a compressed SWF file, but you do not have a static version of the zlib extension enabled"); #endif break; diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c index 08d7024a3b..5d0cf54e86 100644 --- a/ext/standard/streamsfuncs.c +++ b/ext/standard/streamsfuncs.c @@ -365,7 +365,7 @@ PHP_FUNCTION(stream_socket_recvfrom) } if (to_read <= 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Length parameter must be greater than 0."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Length parameter must be greater than 0"); RETURN_FALSE; } @@ -407,7 +407,7 @@ PHP_FUNCTION(stream_get_contents) php_stream_from_zval(stream, &zsrc); if (pos > 0 && php_stream_seek(stream, pos, SEEK_SET) < 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to seek to position %ld in the stream.", pos); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to seek to position %ld in the stream", pos); RETURN_FALSE; } @@ -459,7 +459,7 @@ PHP_FUNCTION(stream_copy_to_stream) php_stream_from_zval(dest, &zdest); if (pos > 0 && php_stream_seek(src, pos, SEEK_SET) < 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to seek to position %ld in the stream.", pos); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to seek to position %ld in the stream", pos); RETURN_FALSE; } @@ -803,10 +803,10 @@ PHP_FUNCTION(stream_select) convert_to_long_ex(sec); if (Z_LVAL_PP(sec) < 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "The seconds parameter must be greater than 0."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "The seconds parameter must be greater than 0"); RETURN_FALSE; } else if (usec < 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "The microseconds parameter must be greater than 0."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "The microseconds parameter must be greater than 0"); RETURN_FALSE; } @@ -1059,7 +1059,7 @@ PHP_FUNCTION(stream_context_get_options) } context = decode_context_param(zcontext TSRMLS_CC); if (!context) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid stream/context parameter."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid stream/context parameter"); RETURN_FALSE; } @@ -1090,7 +1090,7 @@ PHP_FUNCTION(stream_context_set_option) /* figure out where the context is coming from exactly */ context = decode_context_param(zcontext TSRMLS_CC); if (!context) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid stream/context parameter."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid stream/context parameter"); RETURN_FALSE; } @@ -1117,7 +1117,7 @@ PHP_FUNCTION(stream_context_set_params) context = decode_context_param(zcontext TSRMLS_CC); if (!context) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid stream/context parameter."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid stream/context parameter"); RETURN_FALSE; } @@ -1313,7 +1313,7 @@ PHP_FUNCTION(stream_get_line) } if (max_length < 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "The maximum allowed length must be greater than or equal to zero."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "The maximum allowed length must be greater than or equal to zero"); RETURN_FALSE; } if (!max_length) { diff --git a/ext/standard/string.c b/ext/standard/string.c index 28e946cc7d..2162031eb4 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -546,22 +546,22 @@ static inline int php_charmask(unsigned char *input, int len, char *mask TSRMLS_ /* Error, try to be as helpful as possible: (a range ending/starting with '.' won't be captured here) */ if (end-len >= input) { /* there was no 'left' char */ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid '..'-range, no character to the left of '..'."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid '..'-range, no character to the left of '..'"); result = FAILURE; continue; } if (input+2 >= end) { /* there is no 'right' char */ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid '..'-range, no character to the right of '..'."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid '..'-range, no character to the right of '..'"); result = FAILURE; continue; } if (input[-1] > input[2]) { /* wrong order */ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid '..'-range, '..'-range needs to be incrementing."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid '..'-range, '..'-range needs to be incrementing"); result = FAILURE; continue; } /* FIXME: better error (a..b..c is the only left possibility?) */ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid '..'-range."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid '..'-range"); result = FAILURE; continue; } else { @@ -847,7 +847,7 @@ PHP_FUNCTION(wordwrap) } if (linelength == 0 && docut) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Can't force cut when width is zero."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Can't force cut when width is zero"); RETURN_FALSE; } @@ -1110,7 +1110,7 @@ PHP_FUNCTION(explode) } if ( delim_len == 0 ) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty delimiter."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty delimiter"); RETURN_FALSE; } @@ -1264,7 +1264,7 @@ PHP_FUNCTION(implode) if (argc == 1) { if (Z_TYPE_PP(arg1) != IS_ARRAY) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Argument to implode must be an array."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Argument to implode must be an array"); RETURN_FALSE; } else { SEPARATE_ZVAL(arg1); @@ -1292,7 +1292,7 @@ PHP_FUNCTION(implode) } delim = *arg1; } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bad arguments."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bad arguments"); RETURN_FALSE; } } @@ -1358,7 +1358,7 @@ PHP_FUNCTION(strtok) } if (BG(strtok_zval) && tok_type != Z_TYPE_P(BG(strtok_zval))) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Delimiter type must match string type."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Delimiter type must match string type"); RETURN_FALSE; } @@ -2363,7 +2363,7 @@ PHP_FUNCTION(stristr) if (Z_TYPE_PP(needle) == IS_UNICODE || Z_TYPE_PP(needle) == IS_STRING) { if (!Z_UNILEN_PP(needle)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty delimiter."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty delimiter"); RETURN_FALSE; } if (Z_TYPE_PP(haystack) != Z_TYPE_PP(needle)) { @@ -2446,7 +2446,7 @@ PHP_FUNCTION(strstr) if (Z_TYPE_PP(needle) == IS_STRING || Z_TYPE_PP(needle) == IS_UNICODE) { if (!Z_STRLEN_PP(needle)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty delimiter."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty delimiter"); RETURN_FALSE; } @@ -2554,13 +2554,13 @@ PHP_FUNCTION(strpos) * code units, and leave the rest to zend_u_memnstr(). */ if (offset < 0 || offset > haystack_len) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset not contained in string."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset not contained in string"); RETURN_FALSE; } if (Z_TYPE_PP(needle) == IS_STRING || Z_TYPE_PP(needle) == IS_UNICODE) { if (!Z_STRLEN_PP(needle)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty delimiter."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty delimiter"); RETURN_FALSE; } @@ -2653,7 +2653,7 @@ PHP_FUNCTION(stripos) * code units, and leave the rest to zend_u_memnstr(). */ if (offset < 0 || offset > Z_UNILEN_PP(haystack)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset not contained in string."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset not contained in string"); RETURN_FALSE; } @@ -3150,7 +3150,7 @@ PHP_FUNCTION(chunk_split) } if (chunklen <= 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Chunk length should be greater than zero."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Chunk length should be greater than zero"); RETURN_FALSE; } @@ -3392,7 +3392,7 @@ PHP_FUNCTION(substr_replace) if (Z_TYPE_PP(str) != IS_ARRAY) { if ( (argc == 3 && Z_TYPE_PP(from) == IS_ARRAY) || (argc == 4 && Z_TYPE_PP(from) != Z_TYPE_PP(len)) ) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "'from' and 'len' should be of same type - numerical or array "); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "'from' and 'len' should be of same type - numerical or array"); RETURN_ZVAL(*str, 1, 0); } if (argc == 4 && Z_TYPE_PP(from) == IS_ARRAY) { @@ -3433,7 +3433,7 @@ PHP_FUNCTION(substr_replace) RETURN_STRINGL((char *)result, result_len, 0); } } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Functionality of 'from' and 'len' as arrays is not implemented."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Functionality of 'from' and 'len' as arrays is not implemented"); RETURN_ZVAL(*str, 1, 0); } } else { /* str is array of strings */ @@ -4138,7 +4138,7 @@ PHP_FUNCTION(strtr) } if (ac == 2 && Z_TYPE_PP(from) != IS_ARRAY) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "The second argument is not an array."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "The second argument is not an array"); RETURN_FALSE; } @@ -5966,7 +5966,7 @@ PHP_FUNCTION(setlocale) cat = Z_LVAL_PP(pcategory); } else { /* FIXME: The following behaviour should be removed. */ char *category; - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Passing locale category name as string is deprecated. Use the LC_* -constants instead."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Passing locale category name as string is deprecated. Use the LC_* -constants instead"); convert_to_string_ex(pcategory); category = Z_STRVAL_P(*pcategory); @@ -5987,7 +5987,7 @@ PHP_FUNCTION(setlocale) else if (!strcasecmp ("LC_TIME", category)) cat = LC_TIME; else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid locale category name %s, must be one of LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC, or LC_TIME.", category); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid locale category name %s, must be one of LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC, or LC_TIME", category); efree(args); RETURN_FALSE; } @@ -6764,7 +6764,7 @@ PHP_FUNCTION(count_chars) if (ZEND_NUM_ARGS() > 1) { if (mode < 0 || mode > 4) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown mode."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown mode"); RETURN_FALSE; } if (UG(unicode) && mode != 1) { @@ -7001,7 +7001,7 @@ PHP_FUNCTION(substr_count) } if (needle_len == 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty substring."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty substring"); RETURN_FALSE; } @@ -7015,7 +7015,7 @@ PHP_FUNCTION(substr_count) if (ac > 2) { if (offset < 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset should be greater than or equal to 0."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset should be greater than or equal to 0"); RETURN_FALSE; } if (haystack_type == IS_UNICODE) { @@ -7026,12 +7026,12 @@ PHP_FUNCTION(substr_count) p = (char *)haystack + offset; } if (p > endp) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset value %ld exceeds string length.", offset); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset value %ld exceeds string length", offset); RETURN_FALSE; } if (ac == 4) { if (length < 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Length should be greater than 0."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Length should be greater than 0"); RETURN_FALSE; } if (haystack_type == IS_UNICODE) { @@ -7043,7 +7043,7 @@ PHP_FUNCTION(substr_count) tmp = (char *)p + length; } if (tmp > endp) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset value %ld exceeds string length.", offset); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset value %ld exceeds string length", offset); RETURN_FALSE; } else { endp = tmp; @@ -7128,12 +7128,12 @@ PHP_FUNCTION(str_pad) /* Setup the padding string values if NOT specified. */ if (ZEND_NUM_ARGS() > 2) { if (padstr_len == 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Padding string cannot be empty."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Padding string cannot be empty"); return; } if (ZEND_NUM_ARGS() > 3) { if (pad_type < STR_PAD_LEFT || pad_type > STR_PAD_BOTH) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Padding type has to be STR_PAD_LEFT, STR_PAD_RIGHT, or STR_PAD_BOTH."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Padding type has to be STR_PAD_LEFT, STR_PAD_RIGHT, or STR_PAD_BOTH"); return; } } else { @@ -7537,7 +7537,7 @@ PHP_FUNCTION(str_split) } if (split_length <= 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "The length of each segment must be greater than zero."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "The length of each segment must be greater than zero"); RETURN_FALSE; } @@ -7581,7 +7581,7 @@ PHP_FUNCTION(strpbrk) } if (!char_list_len) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "The character list cannot be empty."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "The character list cannot be empty"); RETURN_FALSE; } diff --git a/ext/standard/uniqid.c b/ext/standard/uniqid.c index e5b5a62375..b2bb0e983b 100644 --- a/ext/standard/uniqid.c +++ b/ext/standard/uniqid.c @@ -64,7 +64,7 @@ PHP_FUNCTION(uniqid) #if HAVE_USLEEP && !defined(PHP_WIN32) if (!more_entropy) { #if defined(__CYGWIN__) - php_error_docref(NULL TSRMLS_CC, E_WARNING, "You must use 'more entropy' under CYGWIN."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "You must use 'more entropy' under CYGWIN"); RETURN_FALSE; #else usleep(1); diff --git a/ext/standard/url.c b/ext/standard/url.c index a1e90f833e..06b53d58e7 100644 --- a/ext/standard/url.c +++ b/ext/standard/url.c @@ -375,7 +375,7 @@ PHP_FUNCTION(parse_url) if (resource->fragment != NULL) RETVAL_STRING(resource->fragment, 1); break; default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid URL component identifier %ld.", key); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid URL component identifier %ld", key); RETVAL_FALSE; } goto done; diff --git a/ext/standard/uuencode.c b/ext/standard/uuencode.c index 7cfd4e70db..52245cc23b 100644 --- a/ext/standard/uuencode.c +++ b/ext/standard/uuencode.c @@ -238,7 +238,7 @@ PHP_FUNCTION(convert_uudecode) } if (dst_len < 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "The given parameter is not a valid uuencoded string."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "The given parameter is not a valid uuencoded string"); RETURN_FALSE; } diff --git a/ext/standard/var.c b/ext/standard/var.c index 048b9356c2..d0780ddd80 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -775,7 +775,7 @@ static void php_var_serialize_class(smart_str *buf, zval **struc, zval *retval_p if (Z_TYPE_PP(name) != (UG(unicode)?IS_UNICODE:IS_STRING)) { php_error_docref(NULL TSRMLS_CC, E_NOTICE, "__sleep should return an array only " "containing the names of instance-variables to " - "serialize."); + "serialize"); /* we should still add element even if it's not OK, since we already wrote the length of the array before */ smart_str_appendl(buf,"N;", 2); @@ -960,7 +960,7 @@ static void php_var_serialize_intern(smart_str *buf, zval **struc, HashTable *va } else { php_error_docref(NULL TSRMLS_CC, E_NOTICE, "__sleep should return an array only " "containing the names of instance-variables to " - "serialize."); + "serialize"); /* we should still add element even if it's not OK, since we already wrote the length of the array before */ smart_str_appendl(buf,"N;", 2); diff --git a/ext/sybase/php_sybase_db.c b/ext/sybase/php_sybase_db.c index 684fa62dce..dd2f1c053c 100644 --- a/ext/sybase/php_sybase_db.c +++ b/ext/sybase/php_sybase_db.c @@ -935,7 +935,7 @@ PHP_FUNCTION(sybase_query) /* Check assumption that dbnextrow returns NO_MORE_ROWS */ retvalue = dbnextrow(sybase_ptr->link); if (retvalue != NO_MORE_ROWS) { - php_error_docref(NULL TSRMLS_CC, E_WARNING,"Expected dbnextrow() to return NO_MORE_ROWS."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Expected dbnextrow() to return NO_MORE_ROWS"); } } } diff --git a/ext/sybase_ct/php_sybase_ct.c b/ext/sybase_ct/php_sybase_ct.c index a476f78999..01b857570e 100644 --- a/ext/sybase_ct/php_sybase_ct.c +++ b/ext/sybase_ct/php_sybase_ct.c @@ -512,16 +512,16 @@ static int php_sybase_do_connect_internal(sybase_link *sybase, char *host, char if (charset) { if (cs_loc_alloc(SybCtG(context), &tmp_locale)!=CS_SUCCEED) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Sybase: Unable to allocate locale information."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Sybase: Unable to allocate locale information"); } else { if (cs_locale(SybCtG(context), CS_SET, tmp_locale, CS_LC_ALL, NULL, CS_NULLTERM, NULL)!=CS_SUCCEED) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Sybase: Unable to load default locale data."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Sybase: Unable to load default locale data"); } else { if (cs_locale(SybCtG(context), CS_SET, tmp_locale, CS_SYB_CHARSET, charset, CS_NULLTERM, NULL)!=CS_SUCCEED) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Sybase: Unable to update character set."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Sybase: Unable to update character set"); } else { if (ct_con_props(sybase->connection, CS_SET, CS_LOC_PROP, tmp_locale, CS_UNUSED, NULL)!=CS_SUCCEED) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Sybase: Unable to update connection properties."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Sybase: Unable to update connection properties"); } } } @@ -530,7 +530,7 @@ static int php_sybase_do_connect_internal(sybase_link *sybase, char *host, char if (cfg_get_long("sybct.packet_size", &packetsize) == SUCCESS) { if (ct_con_props(sybase->connection, CS_SET, CS_PACKETSIZE, (CS_VOID *)&packetsize, CS_UNUSED, NULL) != CS_SUCCEED) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Sybase: Unable to update connection packetsize."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Sybase: Unable to update connection packetsize"); } } diff --git a/ext/sysvmsg/sysvmsg.c b/ext/sysvmsg/sysvmsg.c index f4882f3a83..1bdb3c13a1 100644 --- a/ext/sysvmsg/sysvmsg.c +++ b/ext/sysvmsg/sysvmsg.c @@ -411,7 +411,7 @@ PHP_FUNCTION(msg_send) break; default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Message parameter must be either a string or a number."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Message parameter must be either a string or a number"); RETURN_FALSE; } diff --git a/ext/tidy/tidy.c b/ext/tidy/tidy.c index 57fe0c8377..65a0e31041 100644 --- a/ext/tidy/tidy.c +++ b/ext/tidy/tidy.c @@ -165,7 +165,7 @@ if (php_check_open_basedir(filename TSRMLS_CC)) { \ #define TIDY_SET_DEFAULT_CONFIG(_doc) \ if (TG(default_config) && TG(default_config)[0]) { \ if (tidyLoadConfig(_doc, TG(default_config)) < 0) { \ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to load Tidy configuration file at '%s'.", TG(default_config)); \ + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to load Tidy configuration file at '%s'", TG(default_config)); \ } \ } /* }}} */ @@ -1202,7 +1202,7 @@ static PHP_FUNCTION(tidy_parse_file) obj = (PHPTidyObj *) zend_object_store_get_object(return_value TSRMLS_CC); if (!(contents = php_tidy_file_to_mem(inputfile, use_include_path, &contents_len TSRMLS_CC))) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot Load '%s' into memory %s", inputfile, (use_include_path) ? "(Using include path)" : ""); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot Load '%s' into memory%s", inputfile, (use_include_path) ? " (Using include path)" : ""); RETURN_FALSE; } @@ -1516,7 +1516,7 @@ static TIDY_DOC_METHOD(__construct) if (inputfile) { if (!(contents = php_tidy_file_to_mem(inputfile, use_include_path, &contents_len TSRMLS_CC))) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot Load '%s' into memory %s", inputfile, (use_include_path) ? "(Using include path)" : ""); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot Load '%s' into memory%s", inputfile, (use_include_path) ? " (Using include path)" : ""); return; } @@ -1547,7 +1547,7 @@ static TIDY_DOC_METHOD(parseFile) } if (!(contents = php_tidy_file_to_mem(inputfile, use_include_path, &contents_len TSRMLS_CC))) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot Load '%s' into memory %s", inputfile, (use_include_path) ? "(Using include path)" : ""); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot Load '%s' into memory%s", inputfile, (use_include_path) ? " (Using include path)" : ""); RETURN_FALSE; } diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c index 437946881b..ba48d3fb3d 100644 --- a/ext/wddx/wddx.c +++ b/ext/wddx/wddx.c @@ -462,7 +462,7 @@ static void php_wddx_serialize_object(wddx_packet *packet, zval *obj) zend_hash_get_current_data(HASH_OF(retval), (void **)&varname) == SUCCESS; zend_hash_move_forward(HASH_OF(retval))) { if (Z_TYPE_PP(varname) != IS_STRING) { - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "__sleep should return an array only containing the names of instance-variables to serialize."); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "__sleep should return an array only containing the names of instance-variables to serialize"); continue; } diff --git a/ext/xml/xml.c b/ext/xml/xml.c index 2b6c45a688..bf0dedd0da 100644 --- a/ext/xml/xml.c +++ b/ext/xml/xml.c @@ -1504,7 +1504,7 @@ PHP_FUNCTION(xml_parser_free) ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, "XML Parser", le_xml_parser); if (parser->isparsing == 1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Parser cannot be freed while it is parsing."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Parser cannot be freed while it is parsing"); RETURN_FALSE; } diff --git a/ext/xmlreader/php_xmlreader.c b/ext/xmlreader/php_xmlreader.c index 2c7c054b11..bf228b9dbb 100644 --- a/ext/xmlreader/php_xmlreader.c +++ b/ext/xmlreader/php_xmlreader.c @@ -551,11 +551,11 @@ static void php_xmlreader_set_relaxng_schema(INTERNAL_FUNCTION_PARAMETERS, int t } } - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to set schema. This must be set prior to reading or schema contains errors."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to set schema. This must be set prior to reading or schema contains errors"); RETURN_FALSE; #else - php_error_docref(NULL TSRMLS_CC, E_WARNING, "No Schema support built into libxml."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "No Schema support built into libxml"); RETURN_FALSE; #endif @@ -1022,11 +1022,11 @@ PHP_METHOD(xmlreader, setSchema) } } - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to set schema. This must be set prior to reading or schema contains errors."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to set schema. This must be set prior to reading or schema contains errors"); RETURN_FALSE; #else - php_error_docref(NULL TSRMLS_CC, E_WARNING, "No Schema support built into libxml."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "No Schema support built into libxml"); RETURN_FALSE; #endif @@ -1177,7 +1177,7 @@ PHP_METHOD(xmlreader, expand) node = xmlTextReaderExpand(intern->ptr); if (node == NULL) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "An Error Occured while expanding "); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "An Error Occured while expanding"); RETURN_FALSE; } else { nodec = xmlCopyNode(node, 1); diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c index 28d4f4e5ee..103ece66d5 100644 --- a/ext/xsl/xsltprocessor.c +++ b/ext/xsl/xsltprocessor.c @@ -268,14 +268,14 @@ static void xsl_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, int t php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call handler %R()", Z_TYPE(callable), Z_UNIVAL(callable)); } else if ( intern->registerPhpFunctions == 2 && zend_u_hash_exists(intern->registered_phpfunctions, Z_TYPE(callable), Z_UNIVAL(callable), Z_UNILEN(callable) + 1) == 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Not allowed to call handler '%R()'.", Z_TYPE(callable), Z_UNIVAL(callable)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Not allowed to call handler '%R()'", Z_TYPE(callable), Z_UNIVAL(callable)); // Push an empty string, so that we at least have an xslt result... valuePush(ctxt, xmlXPathNewString("")); } else { result = zend_call_function(&fci, NULL TSRMLS_CC); if (result == FAILURE) { if (Z_TYPE(callable) == IS_STRING || Z_TYPE(callable) == IS_UNICODE) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call handler '%R()'.", Z_TYPE(callable), Z_UNIVAL(callable)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call handler '%R()'", Z_TYPE(callable), Z_UNIVAL(callable)); } /* retval is == NULL, when an exception occured, don't report anything, because PHP itself will handle that */ } else if (retval == NULL) { diff --git a/ext/zlib/zlib_filter.c b/ext/zlib/zlib_filter.c index 0df5341866..d944dfbfcf 100644 --- a/ext/zlib/zlib_filter.c +++ b/ext/zlib/zlib_filter.c @@ -292,7 +292,7 @@ static php_stream_filter *php_zlib_filter_create(const char *filtername, zval *f /* Create this filter */ data = pecalloc(1, sizeof(php_zlib_filter_data), persistent); if (!data) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed allocating %ld bytes.", sizeof(php_zlib_filter_data)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed allocating %ld bytes", sizeof(php_zlib_filter_data)); return NULL; } @@ -304,14 +304,14 @@ static php_stream_filter *php_zlib_filter_create(const char *filtername, zval *f data->strm.avail_out = data->outbuf_len = data->inbuf_len = 2048; data->strm.next_in = data->inbuf = (Bytef *) pemalloc(data->inbuf_len, persistent); if (!data->inbuf) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed allocating %ld bytes.", data->inbuf_len); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed allocating %ld bytes", data->inbuf_len); pefree(data, persistent); return NULL; } data->strm.avail_in = 0; data->strm.next_out = data->outbuf = (Bytef *) pemalloc(data->outbuf_len, persistent); if (!data->outbuf) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed allocating %ld bytes.", data->outbuf_len); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed allocating %ld bytes", data->outbuf_len); pefree(data->inbuf, persistent); pefree(data, persistent); return NULL; @@ -403,7 +403,7 @@ factory_setlevel: zval_ptr_dtor(tmpzval); break; default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filter parameter, ignored."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filter parameter, ignored"); } } status = deflateInit2(&(data->strm), level, Z_DEFLATED, windowBits, memLevel, 0); diff --git a/main/streams/filter.c b/main/streams/filter.c index 0bfd7fa853..1984905f7b 100644 --- a/main/streams/filter.c +++ b/main/streams/filter.c @@ -436,7 +436,7 @@ PHPAPI void _php_stream_filter_append(php_stream_filter_chain *chain, php_stream } php_stream_bucket_unlink(bucket TSRMLS_CC); php_stream_bucket_delref(bucket TSRMLS_CC); - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Filter failed to process pre-buffered data. Not adding to filterchain."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Filter failed to process pre-buffered data. Not adding to filterchain"); } else { /* This filter addition may change the readbuffer type. Since all the previously held data is in the bucket brigade, diff --git a/main/streams/streams.c b/main/streams/streams.c index 7234a1689d..6cdb158537 100755 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -2066,7 +2066,7 @@ PHPAPI php_stream_wrapper *php_stream_locate_url_wrapper(const char *path, char /* BC with older php scripts and zlib wrapper */ protocol = "compress.zlib"; n = 13; - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Use of \"zlib:\" wrapper is deprecated; please use \"compress.zlib://\" instead."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Use of \"zlib:\" wrapper is deprecated; please use \"compress.zlib://\" instead"); } if (protocol) { @@ -2335,7 +2335,7 @@ PHPAPI php_stream *_php_stream_open_wrapper_ex(char *path, char *mode, int optio wrapper = php_stream_locate_url_wrapper(path, &path_to_open, options TSRMLS_CC); if (options & STREAM_USE_URL && (!wrapper || !wrapper->is_url)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "This function may only be used against URLs."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "This function may only be used against URLs"); return NULL; } diff --git a/main/streams/unicode_filter.c b/main/streams/unicode_filter.c index 84041773f5..c51bc06365 100644 --- a/main/streams/unicode_filter.c +++ b/main/streams/unicode_filter.c @@ -288,7 +288,7 @@ static php_stream_filter *php_unicode_filter_create(const char *filtername, zval /* Create this filter */ data = (php_unicode_filter_data *)pecalloc(1, sizeof(php_unicode_filter_data), persistent); if (!data) { - php_error_docref(NULL TSRMLS_CC, E_ERROR, "Failed allocating %d bytes.", sizeof(php_unicode_filter_data)); + php_error_docref(NULL TSRMLS_CC, E_ERROR, "Failed allocating %d bytes", sizeof(php_unicode_filter_data)); return NULL; } diff --git a/main/streams/userspace.c b/main/streams/userspace.c index 9bd290f9ad..b95747cf59 100644 --- a/main/streams/userspace.c +++ b/main/streams/userspace.c @@ -456,7 +456,7 @@ PHP_FUNCTION(stream_wrapper_register) } else { /* We failed. But why? */ if (zend_hash_exists(php_stream_get_url_stream_wrappers_hash(), protocol, protocol_len)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Protocol %s:// is already defined.", protocol); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Protocol %s:// is already defined", protocol); } else { /* Should never happen */ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to register wrapper class %s to %s://", classname, protocol);