diff options
| -rw-r--r-- | ext/dom/document.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/dom/document.c b/ext/dom/document.c index 392bfcb115..aa909ee6d8 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -115,10 +115,10 @@ static void php_dom_ctx_error(void *ctx, const char *msg, ...) { va_list ap; char *buf; int len; - TSRMLS_FETCH(); - xmlParserCtxtPtr parser; + TSRMLS_FETCH(); + parser = (xmlParserCtxtPtr) ctx; va_start(ap, msg); @@ -129,6 +129,7 @@ static void php_dom_ctx_error(void *ctx, const char *msg, ...) { while (len && buf[--len] == '\n') { buf[len] = '\0'; } + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s in %s, line: %d", buf, parser->input->filename, parser->input->line); efree(buf); } |
