diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2003-01-24 16:29:40 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2003-01-24 16:29:40 +0000 |
commit | 38ad0e91046fc7bd882f235491a275271897ccf7 (patch) | |
tree | 649b2075834b0aee3bfb2e4141e6f9c408c3caa9 | |
parent | 95bfbfe1c1cad6611a157b7f7c0e909774dd5511 (diff) | |
download | php-git-38ad0e91046fc7bd882f235491a275271897ccf7.tar.gz |
zend_error -> php_error_docref.
-rw-r--r-- | ext/crack/crack.c | 6 | ||||
-rw-r--r-- | ext/gmp/gmp.c | 14 | ||||
-rw-r--r-- | ext/standard/array.c | 3 | ||||
-rw-r--r-- | ext/standard/assert.c | 4 | ||||
-rw-r--r-- | ext/standard/browscap.c | 2 | ||||
-rw-r--r-- | ext/standard/html.c | 2 | ||||
-rw-r--r-- | ext/standard/var_unserializer.c | 10 | ||||
-rw-r--r-- | ext/standard/var_unserializer.re | 6 | ||||
-rw-r--r-- | ext/sysvmsg/sysvmsg.c | 6 |
9 files changed, 25 insertions, 28 deletions
diff --git a/ext/crack/crack.c b/ext/crack/crack.c index 414079ed29..5bd362d0f5 100644 --- a/ext/crack/crack.c +++ b/ext/crack/crack.c @@ -69,11 +69,11 @@ long _crack_open_dict(char *dictpath TSRMLS_DC) long resource; if (CRACKG(current_id) != -1) { - zend_error(E_WARNING, "Can not use more than one open dictionary with this implementation of libcrack"); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Can not use more than one open dictionary with this implementation of libcrack"); return -1; } if (NULL == (pwdict = PWOpen(dictpath, "r"))) { - zend_error(E_WARNING, "Unable to open a crack dictionary"); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to open a crack dictionary"); return -1; } @@ -256,7 +256,7 @@ ZEND_FUNCTION(crack_getlastmessage) } if (NULL == CRACKG(last_message)) { - zend_error(E_WARNING, "No obscure checks in this session"); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "No obscure checks in this session"); RETURN_FALSE; } diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c index d5ae481ff0..8a78bde5bd 100644 --- a/ext/gmp/gmp.c +++ b/ext/gmp/gmp.c @@ -178,7 +178,7 @@ ZEND_MODULE_INFO_D(gmp) if(Z_TYPE_PP(zval) == IS_RESOURCE) { \ ZEND_FETCH_RESOURCE(gmpnumber, mpz_t *, zval, -1, GMP_RESOURCE_NAME, le_gmp);\ } else {\ - if(convert_to_gmp(&gmpnumber, zval, 0) == FAILURE) {\ + if(convert_to_gmp(&gmpnumber, zval, 0 TSRMLS_CC) == FAILURE) {\ RETURN_FALSE;\ }\ ZEND_REGISTER_RESOURCE(NULL, gmpnumber, le_gmp);\ @@ -190,7 +190,7 @@ if(Z_TYPE_PP(zval) == IS_RESOURCE) { \ /* {{{ convert_to_gmp * Convert zval to be gmp number */ -static int convert_to_gmp(mpz_t * *gmpnumber, zval **val, int base) +static int convert_to_gmp(mpz_t * *gmpnumber, zval **val, int base TSRMLS_DC) { int ret = 0; int skip_lead = 0; @@ -224,7 +224,7 @@ static int convert_to_gmp(mpz_t * *gmpnumber, zval **val, int base) } break; default: - zend_error(E_WARNING,"Unable to convert variable to GMP - wrong type"); + php_error_docref(NULL TSRMLS_CC, E_WARNING,"Unable to convert variable to GMP - wrong type"); efree(*gmpnumber); return FAILURE; } @@ -469,12 +469,12 @@ ZEND_FUNCTION(gmp_init) convert_to_long_ex(base_arg); base = Z_LVAL_PP(base_arg); if(base < 2 || base > 36) { - zend_error(E_WARNING, "Bad base for conversion: %d (should be between 2 and 36)", base); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bad base for conversion: %d (should be between 2 and 36)", base); RETURN_FALSE; } } - if(convert_to_gmp(&gmpnumber, number_arg, base) == FAILURE) { + if(convert_to_gmp(&gmpnumber, number_arg, base TSRMLS_CC) == FAILURE) { RETURN_FALSE; } @@ -531,7 +531,7 @@ ZEND_FUNCTION(gmp_strval) } if(base < 2 || base > 36) { - zend_error(E_WARNING, "Bad base for conversion: %d", base); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bad base for conversion: %d", base); RETURN_FALSE; } @@ -760,7 +760,7 @@ ZEND_FUNCTION(gmp_pow) convert_to_long_ex(exp_arg); if(Z_LVAL_PP(exp_arg) < 0) { - zend_error(E_WARNING,"Negative exponent not supported"); + php_error_docref(NULL TSRMLS_CC, E_WARNING,"Negative exponent not supported"); RETURN_FALSE; } diff --git a/ext/standard/array.c b/ext/standard/array.c index 3a91e5bcdf..a1119acb37 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -2083,8 +2083,7 @@ PHPAPI int php_array_merge(HashTable *dest, HashTable *src, int recursive TSRMLS zend_hash_find(dest, string_key, string_key_len, (void **)&dest_entry) == SUCCESS) { if (*src_entry == *dest_entry) { - zend_error(E_WARNING, "%s(): recursion detected", - get_active_function_name(TSRMLS_C)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "recursion detected"); return 0; } SEPARATE_ZVAL(dest_entry); diff --git a/ext/standard/assert.c b/ext/standard/assert.c index da3f525d14..a6b2cef218 100644 --- a/ext/standard/assert.c +++ b/ext/standard/assert.c @@ -157,8 +157,8 @@ 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); - zend_error(E_ERROR, "Failure evaluating code:\n%s", myeval); - /* zend_error() does not return in this case. */ + php_error_docref(NULL TSRMLS_CC, E_ERROR, "Failure evaluating code:\n%s", myeval); + /* php_error_docref() does not return in this case. */ } efree(compiled_string_description); diff --git a/ext/standard/browscap.c b/ext/standard/browscap.c index b2d50d5032..6c9c1f0062 100644 --- a/ext/standard/browscap.c +++ b/ext/standard/browscap.c @@ -228,7 +228,7 @@ PHP_FUNCTION(get_browser) case 0: if (!PG(http_globals)[TRACK_VARS_SERVER] || zend_hash_find(PG(http_globals)[TRACK_VARS_SERVER]->value.ht, "HTTP_USER_AGENT", sizeof("HTTP_USER_AGENT"), (void **) &agent_name)==FAILURE) { - zend_error(E_WARNING, "HTTP_USER_AGENT variable is not set, cannot determine user agent name"); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "HTTP_USER_AGENT variable is not set, cannot determine user agent name"); RETURN_FALSE; } break; diff --git a/ext/standard/html.c b/ext/standard/html.c index c784deec60..2133ed8b71 100644 --- a/ext/standard/html.c +++ b/ext/standard/html.c @@ -703,7 +703,7 @@ PHPAPI char *php_unescape_html_entities(unsigned char *old, int oldlen, int *new /* When we have MBCS entities in the tables above, this will need to handle it */ if (k > 0xff) { - zend_error(E_WARNING, "cannot yet handle MBCS in html_entity_decode()!"); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "cannot yet handle MBCS!"); } replacement[0] = k; replacement[1] = '\0'; diff --git a/ext/standard/var_unserializer.c b/ext/standard/var_unserializer.c index 403fbed930..16a9561a77 100644 --- a/ext/standard/var_unserializer.c +++ b/ext/standard/var_unserializer.c @@ -1,5 +1,5 @@ -/* Generated by re2c 0.5 on Mon Aug 19 22:01:10 2002 */ -#line 1 "var_unserializer.re" +/* Generated by re2c 0.5 on Fri Jan 24 11:25:29 2003 */ +#line 1 "/home/rei/PHP_CVS/php5/ext/standard/var_unserializer.re" #include "php.h" #include "ext/standard/php_var.h" #include "php_incomplete_class.h" @@ -357,7 +357,7 @@ yy14: #line 404 { /* this is the case where we have less data than planned */ - zend_error(E_NOTICE, "Unexpected end of serialized data"); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Unexpected end of serialized data"); return 0; /* not sure if it should be 0 or 1 here? */ } yy15: yych = *++YYCURSOR; @@ -419,12 +419,12 @@ yy22: ZVAL_STRING(arg_func_name, class_name, 1); if (call_user_function_ex(CG(function_table), NULL, user_func, &retval_ptr, 1, args, 0, NULL TSRMLS_CC) != SUCCESS) { - zend_error(E_WARNING, "'unserialize_callback_func' defined (%s) but not found", user_func->value.str.val); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "defined (%s) but not found", user_func->value.str.val); incomplete_class = 1; ce = PHP_IC_ENTRY; } else { if (zend_hash_find(CG(class_table), class_name, len2 + 1, (void **) &ce) != SUCCESS) { - zend_error(E_WARNING, "'unserialize_callback_func' (%s) hasn't defined the class it was called for", user_func->value.str.val); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "(%s) hasn't defined the class it was called for", user_func->value.str.val); incomplete_class = 1; ce = PHP_IC_ENTRY; } else { diff --git a/ext/standard/var_unserializer.re b/ext/standard/var_unserializer.re index 1e6dcd078c..0ef2425faf 100644 --- a/ext/standard/var_unserializer.re +++ b/ext/standard/var_unserializer.re @@ -367,12 +367,12 @@ PHPAPI int php_var_unserialize(UNSERIALIZE_PARAMETER) ZVAL_STRING(arg_func_name, class_name, 1); if (call_user_function_ex(CG(function_table), NULL, user_func, &retval_ptr, 1, args, 0, NULL TSRMLS_CC) != SUCCESS) { - zend_error(E_WARNING, "'unserialize_callback_func' defined (%s) but not found", user_func->value.str.val); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "defined (%s) but not found", user_func->value.str.val); incomplete_class = 1; ce = PHP_IC_ENTRY; } else { if (zend_hash_find(CG(class_table), class_name, len2 + 1, (void **) &ce) != SUCCESS) { - zend_error(E_WARNING, "'unserialize_callback_func' (%s) hasn't defined the class it was called for", user_func->value.str.val); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "(%s) hasn't defined the class it was called for", user_func->value.str.val); incomplete_class = 1; ce = PHP_IC_ENTRY; } else { @@ -403,7 +403,7 @@ PHPAPI int php_var_unserialize(UNSERIALIZE_PARAMETER) "}" { /* this is the case where we have less data than planned */ - zend_error(E_NOTICE, "Unexpected end of serialized data"); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Unexpected end of serialized data"); return 0; /* not sure if it should be 0 or 1 here? */ } diff --git a/ext/sysvmsg/sysvmsg.c b/ext/sysvmsg/sysvmsg.c index e038538fc3..a198b430db 100644 --- a/ext/sysvmsg/sysvmsg.c +++ b/ext/sysvmsg/sysvmsg.c @@ -223,8 +223,7 @@ PHP_FUNCTION(msg_get_queue) /* doesn't already exist; create it */ mq->id = msgget(key, IPC_CREAT|IPC_EXCL|perms); if (mq->id < 0) { - zend_error(E_WARNING, "%s: msgget() failed for key 0x%x: %s", - get_active_function_name(TSRMLS_C), key, strerror(errno)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "failed for key 0x%x: %s", key, strerror(errno)); efree(mq); RETURN_FALSE; } @@ -381,8 +380,7 @@ PHP_FUNCTION(msg_send) efree(messagebuffer); if (result == -1) { - zend_error(E_WARNING, "%s(): msgsnd failed: %s", - get_active_function_name(TSRMLS_C), strerror(errno)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "msgsnd failed: %s", strerror(errno)); if (zerror) { ZVAL_LONG(zerror, errno); } |