]> granicus.if.org Git - php/commitdiff
Fix possibly unclosed <stream> tags
authorBob Weinand <bobwei9@hotmail.com>
Tue, 28 Oct 2014 12:20:43 +0000 (13:20 +0100)
committerBob Weinand <bobwei9@hotmail.com>
Tue, 28 Oct 2014 16:25:45 +0000 (17:25 +0100)
phpdbg_io.c
phpdbg_out.c

index 6908a687d7ed0dbd46b9ebe696fece6231d24675..a2a5c5969f491520c2ed9ba35e21ee3bfe70bdba 100644 (file)
@@ -187,10 +187,6 @@ PHPDBG_API int phpdbg_mixed_read(int sock, char *ptr, int len, int tmo TSRMLS_DC
 
 
 PHPDBG_API int phpdbg_mixed_write(int sock, const char *ptr, int len TSRMLS_DC) {
-       if (PHPDBG_G(flags) & PHPDBG_DISCARD_OUTPUT) {
-               return 0;
-       }
-
        if (PHPDBG_G(flags) & PHPDBG_IS_REMOTE) {
                return phpdbg_send_bytes(sock, ptr, len);
        }
index 365708c71ed1aade0b6faf439d448fa4aa4c7f7d..7e1dc7b744cc7585b67ae0ec00229c49e71e5706 100644 (file)
@@ -1168,6 +1168,10 @@ PHPDBG_API int phpdbg_output_err_buf(const char *tag, const char *xmlfmt, const
        va_list args;
        int errbuf_active = PHPDBG_G(err_buf).active;
 
+       if (PHPDBG_G(flags) & PHPDBG_DISCARD_OUTPUT) {
+               return 0;
+       }
+
        PHPDBG_G(err_buf).active = 0;
 
 #ifdef ZTS
@@ -1188,6 +1192,10 @@ PHPDBG_API int phpdbg_print(int type TSRMLS_DC, int fd, const char *tag, const c
        va_list args;
        int len;
 
+       if (PHPDBG_G(flags) & PHPDBG_DISCARD_OUTPUT) {
+               return 0;
+       }
+
        va_start(args, strfmt);
        len = phpdbg_vprint(type TSRMLS_CC, fd, tag, xmlfmt, strfmt, args);
        va_end(args);
@@ -1198,6 +1206,10 @@ PHPDBG_API int phpdbg_print(int type TSRMLS_DC, int fd, const char *tag, const c
 PHPDBG_API int phpdbg_xml_internal(int fd TSRMLS_DC, const char *fmt, ...) {
        int len = 0;
 
+       if (PHPDBG_G(flags) & PHPDBG_DISCARD_OUTPUT) {
+               return 0;
+       }
+
        if (PHPDBG_G(flags) & PHPDBG_WRITE_XML) {
                va_list args;
                char *buffer;
@@ -1243,6 +1255,10 @@ PHPDBG_API int phpdbg_out_internal(int fd TSRMLS_DC, const char *fmt, ...) {
        int buflen;
        int len = 0;
 
+       if (PHPDBG_G(flags) & PHPDBG_DISCARD_OUTPUT) {
+               return 0;
+       }
+
        va_start(args, fmt);
        buflen = phpdbg_xml_vasprintf(&buffer, fmt, 0, args TSRMLS_CC);
        va_end(args);