summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Strojny <lstrojny@php.net>2008-07-15 09:09:09 +0000
committerLars Strojny <lstrojny@php.net>2008-07-15 09:09:09 +0000
commit4cc5f49d97647bfa465ab33c54b3ce4afc2cca6e (patch)
tree7a704e194b3710bcbfceebf2ea2ba46ab7517349
parent9cd815a9563da3c7000859160c99ca921f0497dd (diff)
downloadphp-git-4cc5f49d97647bfa465ab33c54b3ce4afc2cca6e.tar.gz
Return null on when param parsing errors occur
-rw-r--r--main/output.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/main/output.c b/main/output.c
index 07a3b887e9..295dcfae01 100644
--- a/main/output.c
+++ b/main/output.c
@@ -738,15 +738,14 @@ PHP_FUNCTION(ob_start)
zval *output_handler=NULL;
long chunk_size=0;
zend_bool erase=1;
- int argc = ZEND_NUM_ARGS();
-
- if (zend_parse_parameters(argc TSRMLS_CC, "|zlb", &output_handler, &chunk_size, &erase) == FAILURE) {
- RETURN_FALSE;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|zlb", &output_handler, &chunk_size, &erase) == FAILURE) {
+ return;
}
if (chunk_size < 0)
chunk_size = 0;
-
+
if (php_start_ob_buffer(output_handler, chunk_size, erase TSRMLS_CC)==FAILURE) {
RETURN_FALSE;
}
@@ -965,12 +964,12 @@ static int php_ob_buffer_status(php_ob_buffer *ob_buffer, zval *result)
Return the status of the active or all output buffers */
PHP_FUNCTION(ob_get_status)
{
- int argc = ZEND_NUM_ARGS();
zend_bool full_status = 0;
-
- if (zend_parse_parameters(argc TSRMLS_CC, "|b", &full_status) == FAILURE )
- RETURN_FALSE;
-
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &full_status) == FAILURE ) {
+ return;
+ }
+
array_init(return_value);
if (full_status) {
@@ -1002,7 +1001,7 @@ PHP_FUNCTION(ob_implicit_flush)
long flag = 1;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &flag) == FAILURE) {
- RETURN_FALSE;
+ return;
}
if (flag) {
@@ -1053,7 +1052,7 @@ PHP_FUNCTION(output_add_rewrite_var)
int name_len, value_len;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &name, &name_len, &value, &value_len) == FAILURE) {
- RETURN_FALSE;
+ return;
}
if (php_url_scanner_add_var(name, name_len, value, value_len, 1 TSRMLS_CC) == SUCCESS) {