yohgaki         Thu Oct  3 04:54:45 2002 EDT

  Modified files:              
    /php4/ext/standard  var.c 
  Log:
  Prevent unwanted fluhsing.
  
  
Index: php4/ext/standard/var.c
diff -u php4/ext/standard/var.c:1.145 php4/ext/standard/var.c:1.146
--- php4/ext/standard/var.c:1.145       Wed Jun 26 03:36:01 2002
+++ php4/ext/standard/var.c     Thu Oct  3 04:54:45 2002
@@ -342,21 +342,23 @@
 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);
        }
 }
 /* }}} */



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to