diff options
| author | Yasuo Ohgaki <yohgaki@php.net> | 2002-10-03 13:32:01 +0000 |
|---|---|---|
| committer | Yasuo Ohgaki <yohgaki@php.net> | 2002-10-03 13:32:01 +0000 |
| commit | 39b0eb9b2219f3e1c5291f922ead1bb61b41c22e (patch) | |
| tree | bd2ce03c77ac9c342ed4dc6bc45e1f9297755ac3 /ext | |
| parent | 76a104feb89c79fd5082ea820e2aa646446b37d2 (diff) | |
| download | php-git-39b0eb9b2219f3e1c5291f922ead1bb61b41c22e.tar.gz | |
Fixed broken code by Derick.
ob_implicit_flush() and ob_flush_all() are stopped working.
var_dump() and hightlisht_string() outputs buffer contents wrongly
with ob_implicit_flush().
Everyone should be happy now.
It was only OG(implicit_flush) interpretation issue after all.
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/standard/basic_functions.c | 2 | ||||
| -rw-r--r-- | ext/standard/var.c | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index f52932c9d3..afe4eb9dfc 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -2077,6 +2077,7 @@ PHP_FUNCTION(highlight_string) convert_to_string(expr); if (i) { + php_output_set_status(0 TSRMLS_CC); php_start_ob_buffer (NULL, 0, 1 TSRMLS_CC); } @@ -2093,6 +2094,7 @@ PHP_FUNCTION(highlight_string) if (i) { php_ob_get_buffer (return_value TSRMLS_CC); php_end_ob_buffer (0, 0 TSRMLS_CC); + php_output_set_status(1 TSRMLS_CC); } else { RETURN_TRUE; } diff --git a/ext/standard/var.c b/ext/standard/var.c index 2f4e4c5b3c..0f3c70bdb3 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -342,21 +342,23 @@ void php_var_export(zval **struc, int level TSRMLS_DC) PHP_FUNCTION(var_export) { zval *var; - zend_bool i = 0; + zend_bool return_output = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|b", &var, &i) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|b", &var, &return_output) == FAILURE) { return; } - if (i) { + if (return_output) { + php_output_set_status(0 TSRMLS_CC); php_start_ob_buffer (NULL, 0, 1 TSRMLS_CC); } php_var_export(&var, 1 TSRMLS_CC); - if (i) { + if (return_output) { php_ob_get_buffer (return_value TSRMLS_CC); php_end_ob_buffer (0, 0 TSRMLS_CC); + php_output_set_status(1 TSRMLS_CC); } } /* }}} */ |
