]> granicus.if.org Git - php/commitdiff
zend_error -> php_error_docref.
authorIlia Alshanetsky <iliaa@php.net>
Fri, 24 Jan 2003 16:29:40 +0000 (16:29 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Fri, 24 Jan 2003 16:29:40 +0000 (16:29 +0000)
ext/crack/crack.c
ext/gmp/gmp.c
ext/standard/array.c
ext/standard/assert.c
ext/standard/browscap.c
ext/standard/html.c
ext/standard/var_unserializer.c
ext/standard/var_unserializer.re
ext/sysvmsg/sysvmsg.c

index 414079ed29000f357cdcf83407d33507013386ba..5bd362d0f5160a026027815f1c4c71ab783214bb 100644 (file)
@@ -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;
        }
 
index d5ae481ff0d4f7375a70fabaac55c8eb7f06820d..8a78bde5bd94e3b8af5133ed649277876de457b7 100644 (file)
@@ -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;
        }
        
index 3a91e5bcdfeb3ea19eb10efaa9db8a0a1b06b825..a1119acb37251a430d7401c104fc6c082621f1c2 100644 (file)
@@ -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);
index da3f525d14d13340ef71b02f2a481c42f150eb8c..a6b2cef218ced0c0c04da607b2370c2d5e6bc278 100644 (file)
@@ -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);
 
index b2d50d503231d5656bbc3bce1107a9c79950105e..6c9c1f006207e8c2c505960734f0f19bbbc457b6 100644 (file)
@@ -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;
index c784deec60ef8f4fda0b4df1afb4ede330f67604..2133ed8b7152423fc797ce51be0e68beb8e77c4d 100644 (file)
@@ -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';
index 403fbed930852c84f5d2d517d48d60ac311e59c7..16a9561a77c2ce34683703dcc043e6cbeaee19d7 100644 (file)
@@ -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 {
index 1e6dcd078c572e2e85877430a1e9686ee08e930c..0ef2425faf94f98db4eaf078e71271ce1c7c9cbf 100644 (file)
@@ -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? */
 }
 
index e038538fc3e901e65f560ad71d4f0d076d9f8569..a198b430db38b8ce35ae697cebed71ed51350b6f 100644 (file)
@@ -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);
                }