Skip to content

Commit adbf932

Browse files
committed
*** empty log message ***
1 parent f9b0f60 commit adbf932

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

main/main.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -426,18 +426,20 @@ PHPAPI void php3_error(int type, const char *format,...)
426426
}
427427
}
428428
if (PG(track_errors)) {
429-
pval tmp;
429+
pval *tmp;
430430

431431
va_start(args, format);
432432
size = vsnprintf(buffer, sizeof(buffer) - 1, format, args);
433433
va_end(args);
434434
buffer[sizeof(buffer) - 1] = 0;
435435

436-
tmp.value.str.val = (char *) estrndup(buffer, size);
437-
tmp.value.str.len = size;
438-
tmp.type = IS_STRING;
436+
tmp = (pval *)emalloc(sizeof(pval));
437+
INIT_PZVAL(tmp);
438+
tmp->value.str.val = (char *) estrndup(buffer, size);
439+
tmp->value.str.len = size;
440+
tmp->type = IS_STRING;
439441

440-
_php3_hash_update(EG(active_symbol_table), "php_errormsg", sizeof("php_errormsg"), (void *) & tmp, sizeof(pval), NULL);
442+
_php3_hash_update(EG(active_symbol_table), "php_errormsg", sizeof("php_errormsg"), (void **) & tmp, sizeof(pval *), NULL);
441443
}
442444

443445
switch (type) {

0 commit comments

Comments
 (0)