]> granicus.if.org Git - php/commitdiff
fix #35257 in a smarter way
authorAntony Dovgal <tony2001@php.net>
Thu, 17 Nov 2005 12:02:57 +0000 (12:02 +0000)
committerAntony Dovgal <tony2001@php.net>
Thu, 17 Nov 2005 12:02:57 +0000 (12:02 +0000)
main/output.c

index a922756e80304cc16d434a6fb65ddece4ad3bd63..e0f4ad311d7b6bbeaf56c9bb9f325494ab496ba9 100644 (file)
@@ -296,7 +296,7 @@ PHPAPI void php_end_ob_buffer(zend_bool send_buffer, zend_bool just_flush TSRMLS
        OG(ob_nesting_level)--;
 
        if (send_buffer) {
-               if (just_flush && strlen(final_buffer)) { /* if flush is called prior to proper end, ensure presence of NUL */
+               if (just_flush && final_buffer[0] != '\0') { /* if flush is called prior to proper end, ensure presence of NUL */
                        final_buffer[final_buffer_length] = '\0';
                }
                OG(php_body_write)(final_buffer, final_buffer_length TSRMLS_CC);