cvs: php4 /ext/standard var.c
| From: | Yasuo Ohgaki | Date: | Thu, 03 Oct 2002 08:54:45 +0000 |
| Subject: | cvs: php4 /ext/standard var.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-14449@lists.php.net to get a copy of this message | ||
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);
}
}
/* }}} */