]> granicus.if.org Git - php/commitdiff
fix compile issue - TSRMLS_FETCH is only temporary until errors handled
authorRob Richards <rrichards@php.net>
Fri, 11 Jul 2003 14:19:05 +0000 (14:19 +0000)
committerRob Richards <rrichards@php.net>
Fri, 11 Jul 2003 14:19:05 +0000 (14:19 +0000)
ext/dom/document.c

index 392bfcb115a1ead0fa97b3b8950631e730ddd616..aa909ee6d85a2cd6cce57226affc23054a978586 100644 (file)
@@ -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);
 }