summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>1999-07-21 15:10:04 +0000
committerAndrey Hristov <andrey@php.net>1999-07-21 15:10:04 +0000
commitadbf9327449a679da7ed4a95608bd2528a6616a6 (patch)
treecea543f2ff6595a3155068da27d01139b7ad9b5c
parentf9b0f600980fb021264758ee5d53d693b1dfc342 (diff)
downloadphp-git-adbf9327449a679da7ed4a95608bd2528a6616a6.tar.gz
*** empty log message ***
-rw-r--r--main/main.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/main/main.c b/main/main.c
index 6e801350d0..59d1a54b37 100644
--- a/main/main.c
+++ b/main/main.c
@@ -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) {