projects
/
m6w6
/
ext-psi
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
travis: update
[m6w6/ext-psi]
/
src
/
error.c
diff --git
a/src/error.c
b/src/error.c
index c92b847e3530859083ce001bcb6f24237de36db0..46972f5cb660601923d82f58e6580ac89117bcdf 100644
(file)
--- a/
src/error.c
+++ b/
src/error.c
@@
-23,7
+23,11
@@
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************/
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************/
-#include "php_psi_stdinc.h"
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#else
+# include "php_config.h"
+#endif
#include "data.h"
/* zend_error_cb */
#include "data.h"
/* zend_error_cb */
@@
-57,7
+61,7
@@
void psi_error_wrapper(struct psi_data *context, struct psi_token *t, int type,
}
if (t) {
}
if (t) {
- fn = t->file;
+ fn = t->file
->val
;
ln = t->line;
} else if (zend_is_executing()) {
fn = zend_get_executed_filename();
ln = t->line;
} else if (zend_is_executing()) {
fn = zend_get_executed_filename();
@@
-73,8
+77,15
@@
void psi_error_wrapper(struct psi_data *context, struct psi_token *t, int type,
psi_verror(type, fn, ln, msg, argv);
va_end(argv);
psi_verror(type, fn, ln, msg, argv);
va_end(argv);
+ va_start(argv, msg);
+ PSI_DEBUG_LOCK(context,
+ PSI_DEBUG_PRINTV(context, msg, argv);
+ PSI_DEBUG_PRINT(context, "\n");
+ );
+ va_end(argv);
+
if (context) {
if (context) {
- strlcpy(context->last_error, PG(last_error_message),
+ strlcpy(context->last_error, PG(last_error_message)
->val
,
sizeof(context->last_error));
}
}
sizeof(context->last_error));
}
}
@@
-90,5
+101,7
@@
void psi_error(int type, const char *fn, unsigned ln, const char *msg, ...)
void psi_verror(int type, const char *fn, unsigned ln, const char *msg, va_list argv)
{
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);
}
}