summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerick Rethans <derick@php.net>2002-10-03 10:35:33 +0000
committerDerick Rethans <derick@php.net>2002-10-03 10:35:33 +0000
commit9b517c4b934d71c2270e610015eaf0807e26104c (patch)
treee80a5a271da82d026633b9a69c30e5409be547fd
parent5084c5ecfc13e65f68772d912f72d12c845b3c43 (diff)
downloadphp-git-9b517c4b934d71c2270e610015eaf0807e26104c.tar.gz
- Revert changed to implicit_flush behavior. The new behavior was not
intended in the first place.
-rw-r--r--ext/standard/basic_functions.c2
-rw-r--r--ext/standard/var.c10
-rw-r--r--main/output.c7
-rw-r--r--sapi/cli/php_cli.c1
4 files changed, 7 insertions, 13 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 4d988697f1..ed9019b1e0 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -2077,7 +2077,6 @@ 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);
}
@@ -2094,7 +2093,6 @@ 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 0f3c70bdb3..2f4e4c5b3c 100644
--- a/ext/standard/var.c
+++ b/ext/standard/var.c
@@ -342,23 +342,21 @@ void php_var_export(zval **struc, int level TSRMLS_DC)
PHP_FUNCTION(var_export)
{
zval *var;
- zend_bool return_output = 0;
+ zend_bool i = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|b", &var, &return_output) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|b", &var, &i) == FAILURE) {
return;
}
- if (return_output) {
- php_output_set_status(0 TSRMLS_CC);
+ if (i) {
php_start_ob_buffer (NULL, 0, 1 TSRMLS_CC);
}
php_var_export(&var, 1 TSRMLS_CC);
- if (return_output) {
+ 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);
}
}
/* }}} */
diff --git a/main/output.c b/main/output.c
index 9152334109..63970320f4 100644
--- a/main/output.c
+++ b/main/output.c
@@ -596,11 +596,8 @@ static inline void php_ob_append(const char *text, uint text_length TSRMLS_DC)
/* If implicit_flush is On, send contents to next buffer and return.
Both PG() and OG() should be used since we should flush implicitly
always when implicit_flush is enabled in php.ini */
- if (PG(implicit_flush) || OG(implicit_flush)
- /* Also flush after each chunk if output is chunked */
- || (OG(active_ob_buffer).chunk_size
- && OG(active_ob_buffer).text_length >= OG(active_ob_buffer).chunk_size)
- ) {
+ if (OG(active_ob_buffer).chunk_size
+ && OG(active_ob_buffer).text_length >= OG(active_ob_buffer).chunk_size) {
zval *output_handler = OG(active_ob_buffer).output_handler;
if (output_handler) {
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index 859e3127d3..ddfa66163b 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -466,6 +466,7 @@ int main(int argc, char *argv[])
SG(options) |= SAPI_OPTION_NO_CHDIR;
zend_alter_ini_entry("register_argc_argv", 19, "1", 1, PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE);
zend_alter_ini_entry("html_errors", 12, "0", 1, PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE);
+ zend_alter_ini_entry("implicit_flush", 15, "1", 1, PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE);
zend_alter_ini_entry("max_execution_time", 19, "0", 1, PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE);
zend_uv.html_errors = 0; /* tell the engine we're in non-html mode */