va_start(argv, msg);
psi_verror(type, fn, ln, msg, argv);
-#ifdef __clang__
va_end(argv);
+
va_start(argv, msg);
-#endif
- PSI_DEBUG_PRINTV(context, msg, argv);
+ PSI_DEBUG_LOCK(context,
+ PSI_DEBUG_PRINTV(context, msg, argv);
+ PSI_DEBUG_PRINT(context, "\n");
+ );
va_end(argv);
if (context) {
- strlcpy(context->last_error, PG(last_error_message),
+ strlcpy(context->last_error, PG(last_error_message)->val,
sizeof(context->last_error));
}
}
void psi_verror(int type, const char *fn, unsigned ln, const char *msg, va_list argv)
{
- zend_error_cb(type, fn, ln, msg, argv);
+ zend_string *message = zend_vstrpprintf(0, msg, argv);
+ zend_error_cb(type, fn, ln, message);
+ zend_string_release(message);
}