Browse Source

- Revert changed to implicit_flush behavior. The new behavior was not

intended in the first place.
migration/unlabaled-1.1.2
Derick Rethans 24 years ago
parent
commit
9b517c4b93
  1. 2
      ext/standard/basic_functions.c
  2. 10
      ext/standard/var.c
  3. 7
      main/output.c
  4. 1
      sapi/cli/php_cli.c

2
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;
}

10
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);
}
}
/* }}} */

7
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) {

1
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 */

Loading…
Cancel
Save