]> granicus.if.org Git - php/commitdiff
*** empty log message ***
authorAndrey Hristov <andrey@php.net>
Wed, 21 Jul 1999 15:10:04 +0000 (15:10 +0000)
committerAndrey Hristov <andrey@php.net>
Wed, 21 Jul 1999 15:10:04 +0000 (15:10 +0000)
main/main.c

index 6e801350d0e2559021723fbfb737cb110edf5e59..59d1a54b375c91647bd557d243a54e81e9f4ec14 100644 (file)
@@ -426,18 +426,20 @@ PHPAPI void php3_error(int type, const char *format,...)
                }
        }
        if (PG(track_errors)) {
-               pval tmp;
+               pval *tmp;
 
                va_start(args, format);
                size = vsnprintf(buffer, sizeof(buffer) - 1, format, args);
                va_end(args);
                buffer[sizeof(buffer) - 1] = 0;
 
-               tmp.value.str.val = (char *) estrndup(buffer, size);
-               tmp.value.str.len = size;
-               tmp.type = IS_STRING;
+               tmp = (pval *)emalloc(sizeof(pval));
+               INIT_PZVAL(tmp);
+               tmp->value.str.val = (char *) estrndup(buffer, size);
+               tmp->value.str.len = size;
+               tmp->type = IS_STRING;
 
-               _php3_hash_update(EG(active_symbol_table), "php_errormsg", sizeof("php_errormsg"), (void *) & tmp, sizeof(pval), NULL);
+               _php3_hash_update(EG(active_symbol_table), "php_errormsg", sizeof("php_errormsg"), (void **) & tmp, sizeof(pval *), NULL);
        }
 
        switch (type) {