- Truly fix varargs handling - the current situation was a sure-fire crash in most platforms

(the older code worked, even though it didn't compile well for some very odd reason, probably
  a compiler bug;  The new code would cause PHP to crash if both display_errors/log_errors and
  track_errors were enabled)
This commit is contained in:
Zeev Suraski 2000-08-30 18:02:00 +00:00
parent 9d62ac18ce
commit 0e482b1b30

View File

@ -366,7 +366,6 @@ static void php_error_cb(int type, const char *error_filename, const uint error_
/* get include file name */
if (PG(log_errors) || PG(display_errors) || (!module_initialized)) {
size = vsnprintf(buffer, sizeof(buffer) - 1, format, orig_args);
va_end(orig_args);
buffer[sizeof(buffer) - 1] = 0;
@ -442,7 +441,6 @@ static void php_error_cb(int type, const char *error_filename, const uint error_
pval *tmp;
size = vsnprintf(buffer, sizeof(buffer) - 1, format, orig_args);
va_end(orig_args);
buffer[sizeof(buffer) - 1] = 0;