lstrojny                Tue Jul 15 09:09:09 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/main       output.c 
  Log:
  Return null on when param parsing errors occur
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/output.c?r1=1.167.2.3.2.4.2.4&r2=1.167.2.3.2.4.2.5&diff_format=u
Index: php-src/main/output.c
diff -u php-src/main/output.c:1.167.2.3.2.4.2.4 
php-src/main/output.c:1.167.2.3.2.4.2.5
--- php-src/main/output.c:1.167.2.3.2.4.2.4     Tue Jul 15 08:50:04 2008
+++ php-src/main/output.c       Tue Jul 15 09:09:09 2008
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: output.c,v 1.167.2.3.2.4.2.4 2008/07/15 08:50:04 lstrojny Exp $ */
+/* $Id: output.c,v 1.167.2.3.2.4.2.5 2008/07/15 09:09:09 lstrojny Exp $ */
 
 #include "php.h"
 #include "ext/standard/head.h"
@@ -738,15 +738,14 @@
        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 @@
    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 @@
        long flag = 1;
 
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &flag) == 
FAILURE) {
-               RETURN_FALSE;
+               return;
        }
 
        if (flag) {
@@ -1053,7 +1052,7 @@
        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) {



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

Reply via email to