]> granicus.if.org Git - php/commitdiff
MFH: New way for check void parameters
authorFelipe Pena <felipe@php.net>
Mon, 10 Mar 2008 22:15:36 +0000 (22:15 +0000)
committerFelipe Pena <felipe@php.net>
Mon, 10 Mar 2008 22:15:36 +0000 (22:15 +0000)
40 files changed:
ext/com_dotnet/com_com.c
ext/curl/multi.c
ext/date/php_date.c
ext/dba/dba.c
ext/dom/php_dom.h
ext/fdf/fdf.c
ext/filter/filter.c
ext/gd/gd.c
ext/imap/php_imap.c
ext/interbase/interbase.c
ext/mhash/mhash.c
ext/ming/ming.c
ext/msql/php_msql.c
ext/mysql/php_mysql.c
ext/odbc/php_odbc.c
ext/openssl/openssl.c
ext/pdo/pdo_dbh.c
ext/pdo/pdo_stmt.c
ext/posix/posix.c
ext/session/session.c
ext/skeleton/create_stubs
ext/snmp/snmp.c
ext/soap/soap.c
ext/sqlite/sqlite.c
ext/standard/basic_functions.c
ext/standard/dir.c
ext/standard/filestat.c
ext/standard/head.c
ext/standard/info.c
ext/standard/rand.c
ext/standard/streamsfuncs.c
ext/standard/string.c
ext/standard/syslog.c
ext/standard/user_filters.c
ext/tidy/tidy.c
ext/xmlrpc/xmlrpc-epi-php.c
ext/xmlwriter/php_xmlwriter.c
main/output.c
sapi/apache2handler/php_functions.c
sapi/apache_hooks/php_apache.c

index 673de377f651ca96e1affd592199f187ae2e41ec..34993eb5effd00970c4647fb7537b36d3a4efbcc 100644 (file)
@@ -658,8 +658,8 @@ PHP_FUNCTION(com_create_guid)
        GUID retval;
        OLECHAR *guid_string;
 
-       if (ZEND_NUM_ARGS() != 0) {
-               ZEND_WRONG_PARAM_COUNT();
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        php_com_initialize(TSRMLS_C);
index a931658cb8298f14668f7e41411b8b07d90e01b1..1a0e2a8b45e806ff61940a403f8d605817aba3f3 100644 (file)
@@ -55,8 +55,8 @@ PHP_FUNCTION(curl_multi_init)
 {
        php_curlm *mh;
        
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        mh = ecalloc(1, sizeof(php_curlm));
index fdd7bc2930c2d29a975e0e7b5042ab255b109963..ddb1cb85d8c6e7798e6d561e4f48921a3ccfc024 100644 (file)
@@ -298,8 +298,8 @@ struct _php_timezone_obj {
        php_date_obj *obj;      \
        DATE_SET_CONTEXT; \
        if (object) {   \
-               if (ZEND_NUM_ARGS()) {  \
-                       WRONG_PARAM_COUNT;      \
+               if (zend_parse_parameters_none() == FAILURE) {  \
+                       return; \
                }       \
        } else {        \
                if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, NULL, "O", &object, date_ce_date) == FAILURE) {     \
index 2421f4309d6453f61c40efe29a287e5040c6f975..61b3bc0c413375581ea9257675f86f9c824ed952 100644 (file)
@@ -1200,8 +1200,7 @@ PHP_FUNCTION(dba_list)
        zend_rsrc_list_entry *le;
        dba_info *info;
 
-       if (ZEND_NUM_ARGS()!=0) {
-               ZEND_WRONG_PARAM_COUNT();
+       if (zend_parse_parameters_none() == FAILURE) {
                RETURN_FALSE;
        }
 
index 5408edbfa22902b9abbbde8a3f1bf4c930f0651a..60117d46807c32323f083b338fedf622210c0f84 100644 (file)
@@ -138,8 +138,7 @@ entry = zend_register_internal_class_ex(&ce, parent_ce, NULL TSRMLS_CC);
 }
 
 #define DOM_NO_ARGS() \
-       if (ZEND_NUM_ARGS() != 0) { \
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Expects exactly 0 parameters, %d given", ZEND_NUM_ARGS()); \
+       if (zend_parse_parameters_none() == FAILURE) { \
                return; \
        }
 
index e333a6140677e4295cb26b8ab2e03eb91bf842ea..0783027cbbf31b7fc0d9e29a35c9521271876b93 100644 (file)
@@ -528,8 +528,8 @@ PHP_FUNCTION(fdf_create)
        FDFDoc fdf;
        FDFErc err;
 
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        err = FDFCreate(&fdf);
index 1e3753316bf8db7d33f4a7053f692990f6cbaec4..229d29a4ef107201567d4ee1e1e5b2a0d4bb8e3f 100644 (file)
@@ -835,8 +835,8 @@ PHP_FUNCTION(filter_list)
 {
        int i, size = sizeof(filter_list) / sizeof(filter_list_entry);
 
-       if (ZEND_NUM_ARGS()) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        array_init(return_value);
index 6868c6845705c228175afb8f1b8db0c4b8c5fc2b..3b894d3f7982a836e3b3d6dd6dc6bcd90b9be93c 100644 (file)
@@ -1440,8 +1440,7 @@ PHP_MINFO_FUNCTION(gd)
  */
 PHP_FUNCTION(gd_info)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               ZEND_WRONG_PARAM_COUNT();
+       if (zend_parse_parameters_none() == FAILURE) {
                RETURN_FALSE;
        }
 
@@ -2383,8 +2382,8 @@ PHP_FUNCTION(imagetypes)
        ret |= 16;
 #endif
 
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        RETURN_LONG(ret);
index 0e9740378e0491e4ac9fa80ed7d10fd9b023911b..aad980f7c790cd35ff68d4ab1560816eb0a4ca9b 100644 (file)
@@ -3658,8 +3658,8 @@ PHP_FUNCTION(imap_alerts)
 {
        STRINGLIST *cur=NIL;
 
-       if (ZEND_NUM_ARGS() > 0) {
-               ZEND_WRONG_PARAM_COUNT();
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        } 
   
        if (IMAPG(imap_alertstack) == NIL) {
@@ -3685,8 +3685,8 @@ PHP_FUNCTION(imap_errors)
 {
        ERRORLIST *cur=NIL;
 
-       if (ZEND_NUM_ARGS() > 0) {
-               ZEND_WRONG_PARAM_COUNT();
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        } 
   
        if (IMAPG(imap_errorstack) == NIL) {
@@ -3712,8 +3712,8 @@ PHP_FUNCTION(imap_last_error)
 {
        ERRORLIST *cur=NIL;
 
-       if (ZEND_NUM_ARGS() > 0) {
-               ZEND_WRONG_PARAM_COUNT();
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        } 
   
        if (IMAPG(imap_errorstack) == NIL) {
index 4bd5d9ef84b73db78a657232e51c8bd1f0ff4af1..e1933c33b3f3e1e6816e838edc3873694ececce2 100644 (file)
@@ -203,8 +203,8 @@ int le_link, le_plink, le_trans;
    Return error message */
 PHP_FUNCTION(ibase_errmsg)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        if (IBG(sql_code) != 0) {
@@ -219,8 +219,8 @@ PHP_FUNCTION(ibase_errmsg)
    Return error code */
 PHP_FUNCTION(ibase_errcode)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        if (IBG(sql_code) != 0) {
index 5354d355944c1dad868d3916d76c56f5215d7ee5..6861d48adc1a982489c5f1e031f73938387330eb 100644 (file)
@@ -95,8 +95,8 @@ PHP_MINFO_FUNCTION(mhash)
    Gets the number of available hashes */
 PHP_FUNCTION(mhash_count)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        RETURN_LONG(mhash_count());
index 98619eacf0d2adb9776c9f88a077dc8d16a42014..fd70d8f5fc7b526bc531707152a89c9604d7a7b7 100644 (file)
@@ -443,8 +443,8 @@ static SWFBitmap getBitmap(zval *id TSRMLS_DC)
    Returns the width of this bitmap */
 PHP_METHOD(swfbitmap, getWidth)
 {
-       if(ZEND_NUM_ARGS() != 0) {
-           WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+           return;
        }
        RETURN_DOUBLE(SWFBitmap_getWidth(getBitmap(getThis() TSRMLS_CC)));
 }
@@ -454,8 +454,8 @@ PHP_METHOD(swfbitmap, getWidth)
    Returns the height of this bitmap */
 PHP_METHOD(swfbitmap, getHeight)
 {
-       if(ZEND_NUM_ARGS() != 0) {
-           WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+           return;
        }
        RETURN_DOUBLE(SWFBitmap_getHeight(getBitmap(getThis() TSRMLS_CC)));
 }
@@ -1056,9 +1056,9 @@ PHP_METHOD(swfdisplayitem, remove)
 {
        SWFDisplayItem item = getDisplayItem(getThis() TSRMLS_CC);
 
-       if(ZEND_NUM_ARGS() != 0)
-               WRONG_PARAM_COUNT;
-
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        SWFDisplayItem_remove(item);
 }
 /* }}} */
@@ -1086,9 +1086,9 @@ PHP_METHOD(swfdisplayitem, endMask)
 {
        SWFDisplayItem item = getDisplayItem(getThis() TSRMLS_CC);
 
-       if(ZEND_NUM_ARGS() != 0)
-               WRONG_PARAM_COUNT;
-
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        SWFDisplayItem_endMask(item);
 }
 /* }}} */
@@ -1100,9 +1100,9 @@ PHP_METHOD(swfdisplayitem, getX)
        float ret;
        SWFDisplayItem item = getDisplayItem(getThis() TSRMLS_CC);
 
-       if(ZEND_NUM_ARGS() != 0)
-               WRONG_PARAM_COUNT;
-
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        ret = SWFDisplayItem_get_x(item);
        RETURN_DOUBLE(ret);
 }
@@ -1115,9 +1115,9 @@ PHP_METHOD(swfdisplayitem, getY)
        float ret;
        SWFDisplayItem item = getDisplayItem(getThis() TSRMLS_CC);
 
-       if(ZEND_NUM_ARGS() != 0)
-               WRONG_PARAM_COUNT;
-
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        ret = SWFDisplayItem_get_y(item);
        RETURN_DOUBLE(ret);
 }
@@ -1130,9 +1130,9 @@ PHP_METHOD(swfdisplayitem, getXScale)
        float ret;
        SWFDisplayItem item = getDisplayItem(getThis() TSRMLS_CC);
 
-       if(ZEND_NUM_ARGS() != 0)
-               WRONG_PARAM_COUNT;
-
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        ret = SWFDisplayItem_get_xScale(item);
        RETURN_DOUBLE(ret);
 }
@@ -1145,9 +1145,9 @@ PHP_METHOD(swfdisplayitem, getYScale)
        float ret;
        SWFDisplayItem item = getDisplayItem(getThis() TSRMLS_CC);
 
-       if(ZEND_NUM_ARGS() != 0)
-               WRONG_PARAM_COUNT;
-
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        ret = SWFDisplayItem_get_yScale(item);
        RETURN_DOUBLE(ret);
 }
@@ -1160,9 +1160,9 @@ PHP_METHOD(swfdisplayitem, getXSkew)
        float ret;
        SWFDisplayItem item = getDisplayItem(getThis() TSRMLS_CC);
 
-       if(ZEND_NUM_ARGS() != 0)
-               WRONG_PARAM_COUNT;
-
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        ret = SWFDisplayItem_get_xSkew(item);
        RETURN_DOUBLE(ret);
 }
@@ -1175,9 +1175,9 @@ PHP_METHOD(swfdisplayitem, getYSkew)
        float ret;
        SWFDisplayItem item = getDisplayItem(getThis() TSRMLS_CC);
 
-       if(ZEND_NUM_ARGS() != 0)
-               WRONG_PARAM_COUNT;
-
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        ret = SWFDisplayItem_get_ySkew(item);
        RETURN_DOUBLE(ret);
 }
@@ -1190,9 +1190,9 @@ PHP_METHOD(swfdisplayitem, getRot)
        float ret;
        SWFDisplayItem item = getDisplayItem(getThis() TSRMLS_CC);
 
-       if(ZEND_NUM_ARGS() != 0)
-               WRONG_PARAM_COUNT;
-
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        ret = SWFDisplayItem_get_rot(item);
        RETURN_DOUBLE(ret);
 }
@@ -1547,8 +1547,8 @@ PHP_METHOD(swffont, getWideWidth)
    Returns the ascent of the font, or 0 if not available */
 PHP_METHOD(swffont, getAscent)
 {
-    if(ZEND_NUM_ARGS() != 0) {
-           WRONG_PARAM_COUNT;
+    if (zend_parse_parameters_none() == FAILURE) {
+           return;
        }
        RETURN_DOUBLE(SWFFont_getAscent(getFont(getThis() TSRMLS_CC)));
 }
@@ -1558,8 +1558,8 @@ PHP_METHOD(swffont, getAscent)
    Returns the descent of the font, or 0 if not available */
 PHP_METHOD(swffont, getDescent)
 {
-    if(ZEND_NUM_ARGS() != 0) {
-           WRONG_PARAM_COUNT;
+    if (zend_parse_parameters_none() == FAILURE) {
+           return;
        }
        RETURN_DOUBLE(SWFFont_getDescent(getFont(getThis() TSRMLS_CC)));
 }
@@ -1569,8 +1569,8 @@ PHP_METHOD(swffont, getDescent)
    Returns the leading of the font, or 0 if not available */
 PHP_METHOD(swffont, getLeading)
 {
-    if(ZEND_NUM_ARGS() != 0) {
-           WRONG_PARAM_COUNT;
+    if (zend_parse_parameters_none() == FAILURE) {
+           return;
        }
        RETURN_DOUBLE(SWFFont_getLeading(getFont(getThis() TSRMLS_CC)));
 }
@@ -1879,9 +1879,9 @@ PHP_METHOD(swfsoundinstance, noMultiple)
 {
        SWFSoundInstance inst = getSoundInstance(getThis() TSRMLS_CC);
 
-       if(ZEND_NUM_ARGS() != 0)
-               WRONG_PARAM_COUNT;
-
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        SWFSoundInstance_setNoMultiple(inst);
 }
 /* }}} */
@@ -2031,9 +2031,9 @@ PHP_METHOD(swfvideostream, setdimension)
 /* {{{ getNumFrames */
 PHP_METHOD(swfvideostream, getnumframes) 
 {
-       if(ZEND_NUM_ARGS() != 0)
-               WRONG_PARAM_COUNT;
-
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        RETURN_LONG(SWFVideoStream_getNumFrames(getVideoStream(getThis() TSRMLS_CC)));
 }
 /* }}} */
@@ -3748,8 +3748,8 @@ PHP_METHOD(swftext, getWideWidth)
    Returns the ascent of the current font at its current size, or 0 if not available */
 PHP_METHOD(swftext, getAscent)
 {
-       if(ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
        RETURN_DOUBLE(SWFText_getAscent(getText(getThis() TSRMLS_CC)));
 }
@@ -3759,8 +3759,8 @@ PHP_METHOD(swftext, getAscent)
    Returns the descent of the current font at its current size, or 0 if not available */
 PHP_METHOD(swftext, getDescent)
 {
-       if(ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
   RETURN_DOUBLE(SWFText_getDescent(getText(getThis() TSRMLS_CC)));
 }
@@ -3770,8 +3770,8 @@ PHP_METHOD(swftext, getDescent)
    Returns the leading of the current font at its current size, or 0 if not available */
 PHP_METHOD(swftext, getLeading)
 {
-       if(ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
   RETURN_DOUBLE(SWFText_getLeading(getText(getThis() TSRMLS_CC)));
 }
index 14b3805119832af3552c90f178a3f4667001b0c6..de5920cfa4fcd7e193cc5b5c7388b403bc9eb998 100644 (file)
@@ -747,8 +747,8 @@ PHP_FUNCTION(msql_list_fields)
    Returns the text of the error message from previous mSQL operation */
 PHP_FUNCTION(msql_error)
 {
-       if (ZEND_NUM_ARGS()) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
        RETURN_STRING(msqlErrMsg,1);
 }
index 252623ec135f26bf1d93b0d78a7aeef32710c741..16da0115c7d80f276c3f0021d541765a2d56b189 100644 (file)
@@ -1003,8 +1003,8 @@ PHP_FUNCTION(mysql_select_db)
    Returns a string that represents the client library version */
 PHP_FUNCTION(mysql_get_client_info)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        RETURN_STRING((char *)mysql_get_client_info(),1);       
index ebee68cdae92a10b0014472335614297a3aba073..1768b00738fd0f3cda97b4a6aec4ef2140a8537d 100644 (file)
@@ -782,8 +782,8 @@ PHP_FUNCTION(odbc_close_all)
        int i;
        int nument;
 
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        nument = zend_hash_next_free_element(&EG(regular_list));
index 5c2f443df7383408f474fa1e037353ecac73df05..62dbd25148f1c679806f48773af2b2d28e081a27 100644 (file)
@@ -3648,8 +3648,8 @@ PHP_FUNCTION(openssl_error_string)
        char buf[512];
        unsigned long val;
 
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        val = ERR_get_error();
index a9444c14770bc961cf4f7c4e9afb93d16bc567ba..24712ee40e9f15dcf91f32ca9ece9f36e433ed09 100755 (executable)
@@ -972,8 +972,8 @@ static PHP_METHOD(PDO, errorCode)
 {
        pdo_dbh_t *dbh = zend_object_store_get_object(getThis() TSRMLS_CC);
 
-       if (ZEND_NUM_ARGS()) {
-               RETURN_FALSE;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
        PDO_CONSTRUCT_CHECK;
 
@@ -991,8 +991,8 @@ static PHP_METHOD(PDO, errorInfo)
 {
        pdo_dbh_t *dbh = zend_object_store_get_object(getThis() TSRMLS_CC);
 
-       if (ZEND_NUM_ARGS()) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
        PDO_CONSTRUCT_CHECK;
 
@@ -1134,8 +1134,8 @@ static PHP_METHOD(PDO, getAvailableDrivers)
        HashPosition pos;
        pdo_driver_t **pdriver;
 
-       if (ZEND_NUM_ARGS()) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
        
        array_init(return_value);
index 356962de1d428a3a9c6bfa5af52a1ba988adea2a..43656b6f11ea2a31b9ea5227863b627c09231bd0 100755 (executable)
@@ -1729,8 +1729,8 @@ static PHP_METHOD(PDOStatement, errorCode)
 {
        PHP_STMT_GET_OBJ;
 
-       if (ZEND_NUM_ARGS()) {
-               RETURN_FALSE;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        RETURN_STRING(stmt->error_code, 1);
@@ -1743,8 +1743,8 @@ static PHP_METHOD(PDOStatement, errorInfo)
 {
        PHP_STMT_GET_OBJ;
 
-       if (ZEND_NUM_ARGS()) {
-               RETURN_FALSE;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        array_init(return_value);
@@ -1844,8 +1844,8 @@ static PHP_METHOD(PDOStatement, getAttribute)
 static PHP_METHOD(PDOStatement, columnCount)
 {
        PHP_STMT_GET_OBJ;
-       if (ZEND_NUM_ARGS()) {
-               RETURN_FALSE;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
        RETURN_LONG(stmt->column_count);
 }
index 23217caa7d36e98aa43dd59990e77e16f2ead3f0..2e93e2e35cb4e32ac4c92b9df95902a567741b11 100644 (file)
@@ -209,7 +209,7 @@ zend_module_entry posix_module_entry = {
 ZEND_GET_MODULE(posix)
 #endif
 
-#define PHP_POSIX_NO_ARGS      if (ZEND_NUM_ARGS()) WRONG_PARAM_COUNT;
+#define PHP_POSIX_NO_ARGS      if (zend_parse_parameters_none() == FAILURE) return;
 
 #define PHP_POSIX_RETURN_LONG_FUNC(func_name)  \
        PHP_POSIX_NO_ARGS       \
index 9727541a0f9f83d1af8663ba6d933c771e80281a..b865254c066ba4ddd1e43e5bec8d2478df2f0a33 100644 (file)
@@ -1411,8 +1411,8 @@ PHP_FUNCTION(session_set_cookie_params)
    Return the session cookie parameters */ 
 PHP_FUNCTION(session_get_cookie_params)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        array_init(return_value);
@@ -1763,8 +1763,8 @@ PHP_FUNCTION(session_encode)
        int len;
        char *enc;
 
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        enc = php_session_encode(&len TSRMLS_CC);
@@ -1812,8 +1812,8 @@ PHP_FUNCTION(session_start)
    Destroy the current session and all data associated with it */
 PHP_FUNCTION(session_destroy)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        if (php_session_destroy(TSRMLS_C) == SUCCESS) {
index 61957289d087582cc7bfc3ac9c617f9942f16033..0a5f28607e274bbbd5628b226ad0fa56d530ec1b 100755 (executable)
@@ -197,7 +197,7 @@ END {
                        ints = ints "\tint argc = ZEND_NUM_ARGS();\n"
                        fetchargs = fetchargs "argc TSRMLS_CC, " specs[i]
                } else {
-                       fetchargs = fetchargs "\tif (ZEND_NUM_ARGS() != 0) {\n\t\tWRONG_PARAM_COUNT;\n\t}"
+                       fetchargs = fetchargs "\tif (zend_parse_parameters_none() == FAILURE) {\n\t\treturn;\n\t}"
                        xmlparams = xmlparams "      <void/>\n"
                }
 
index 4864ee7b252738ac1bbedeee7da691609abf14a3..0a880ca1e06d9cc759c5ef18b46d3d611edef74b 100644 (file)
@@ -693,8 +693,8 @@ PHP_FUNCTION(snmprealwalk)
    Return the current status of quick_print */
 PHP_FUNCTION(snmp_get_quick_print)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
 #ifdef HAVE_NET_SNMP
index 2d09138f4876e0e1289a11bb2f5d7ba3785b6685..4e635a42dcb8d06476c3c1c333aff6a71d06f543 100644 (file)
@@ -821,8 +821,8 @@ PHP_METHOD(SoapFault, __toString)
        zend_fcall_info fci;
        zval fname;
 
-       if (ZEND_NUM_ARGS() > 0) {
-               ZEND_WRONG_PARAM_COUNT();
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        faultcode   = zend_read_property(soap_fault_class_entry, this_ptr, "faultcode", sizeof("faultcode")-1, 1 TSRMLS_CC);
index 4cf7d95377b6f70fdd162842e0aa5c3fbb15529c..85933b10faf9b13756636d62882dc153972c613d 100644 (file)
@@ -2426,8 +2426,8 @@ PHP_FUNCTION(sqlite_column)
    Returns the version of the linked SQLite library. */
 PHP_FUNCTION(sqlite_libversion)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
        RETURN_STRING((char*)sqlite_libversion(), 1);
 }
@@ -2437,8 +2437,8 @@ PHP_FUNCTION(sqlite_libversion)
    Returns the encoding (iso8859 or UTF-8) of the linked SQLite library. */
 PHP_FUNCTION(sqlite_libencoding)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
        RETURN_STRING((char*)sqlite_libencoding(), 1);
 }
@@ -2453,8 +2453,8 @@ PHP_FUNCTION(sqlite_changes)
        zval *object = getThis();
 
        if (object) {
-               if (ZEND_NUM_ARGS() != 0) {
-                       WRONG_PARAM_COUNT
+               if (zend_parse_parameters_none() == FAILURE) {
+                       return;
                }
                DB_FROM_OBJECT(db, object);
        } else {
@@ -2477,8 +2477,8 @@ PHP_FUNCTION(sqlite_last_insert_rowid)
        zval *object = getThis();
 
        if (object) {
-               if (ZEND_NUM_ARGS() != 0) {
-                       WRONG_PARAM_COUNT
+               if (zend_parse_parameters_none() == FAILURE) {
+                       return;
                }
                DB_FROM_OBJECT(db, object);
        } else {
@@ -2514,8 +2514,8 @@ PHP_FUNCTION(sqlite_num_rows)
        zval *object = getThis();
 
        if (object) {
-               if (ZEND_NUM_ARGS() != 0) {
-                       WRONG_PARAM_COUNT
+               if (zend_parse_parameters_none() == FAILURE) {
+                       return;
                }
                RES_FROM_OBJECT(res, object);
        } else {
@@ -2543,8 +2543,8 @@ PHP_FUNCTION(sqlite_valid)
        zval *object = getThis();
 
        if (object) {
-               if (ZEND_NUM_ARGS() != 0) {
-                       WRONG_PARAM_COUNT
+               if (zend_parse_parameters_none() == FAILURE) {
+                       return;
                }
                RES_FROM_OBJECT(res, object);
        } else {
@@ -2567,8 +2567,8 @@ PHP_FUNCTION(sqlite_has_prev)
        zval *object = getThis();
 
        if (object) {
-               if (ZEND_NUM_ARGS() != 0) {
-                       WRONG_PARAM_COUNT
+               if (zend_parse_parameters_none() == FAILURE) {
+                       return;
                }
                RES_FROM_OBJECT(res, object);
        } else {
@@ -2596,8 +2596,8 @@ PHP_FUNCTION(sqlite_num_fields)
        zval *object = getThis();
 
        if (object) {
-               if (ZEND_NUM_ARGS() != 0) {
-                       WRONG_PARAM_COUNT
+               if (zend_parse_parameters_none() == FAILURE) {
+                       return;
                }
                RES_FROM_OBJECT(res, object);
        } else {
@@ -2686,8 +2686,8 @@ PHP_FUNCTION(sqlite_rewind)
        zval *object = getThis();
 
        if (object) {
-               if (ZEND_NUM_ARGS() != 0) {
-                       WRONG_PARAM_COUNT
+               if (zend_parse_parameters_none() == FAILURE) {
+                       return;
                }
                RES_FROM_OBJECT(res, object);
        } else {
@@ -2721,8 +2721,8 @@ PHP_FUNCTION(sqlite_next)
        zval *object = getThis();
 
        if (object) {
-               if (ZEND_NUM_ARGS() != 0) {
-                       WRONG_PARAM_COUNT
+               if (zend_parse_parameters_none() == FAILURE) {
+                       return;
                }
                RES_FROM_OBJECT(res, object);
        } else {
@@ -2756,8 +2756,8 @@ PHP_FUNCTION(sqlite_key)
        zval *object = getThis();
 
        if (object) {
-               if (ZEND_NUM_ARGS() != 0) {
-                       WRONG_PARAM_COUNT
+               if (zend_parse_parameters_none() == FAILURE) {
+                       return;
                }
                RES_FROM_OBJECT(res, object);
        } else {
@@ -2780,8 +2780,8 @@ PHP_FUNCTION(sqlite_prev)
        zval *object = getThis();
 
        if (object) {
-               if (ZEND_NUM_ARGS() != 0) {
-                       WRONG_PARAM_COUNT
+               if (zend_parse_parameters_none() == FAILURE) {
+                       return;
                }
                RES_FROM_OBJECT(res, object);
        } else {
@@ -2849,8 +2849,8 @@ PHP_FUNCTION(sqlite_last_error)
        zval *object = getThis();
 
        if (object) {
-               if (ZEND_NUM_ARGS() != 0) {
-                       WRONG_PARAM_COUNT
+               if (zend_parse_parameters_none() == FAILURE) {
+                       return;
                }
                DB_FROM_OBJECT(db, object);
        } else {
index 72b20819130641d991dcc1857a0dbcec183b32bb..8a9faed61511fd0470bbcd526dfa129378978534 100644 (file)
@@ -1,3 +1,4 @@
+
 /*
    +----------------------------------------------------------------------+
    | PHP Version 5                                                        |
@@ -4866,8 +4867,8 @@ PHP_FUNCTION(time_sleep_until)
    Get the name of the owner of the current PHP script */
 PHP_FUNCTION(get_current_user)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        RETURN_STRING(php_get_current_user(), 1);
index 11dcb0cf8d51a7f71fb6194b9a85ab9b4d11f640..de2bf732c4df58ac5620099adb91d505026e5106 100644 (file)
@@ -333,8 +333,8 @@ PHP_FUNCTION(getcwd)
        char path[MAXPATHLEN];
        char *ret=NULL;
        
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
 #if HAVE_GETCWD
index 96d7af9ae49cab1a08c19714c282bb7cd90d6b05..2707c50da448b8189034e93081a43d7d0f0abcbd 100644 (file)
@@ -730,8 +730,8 @@ PHPAPI void php_clear_stat_cache(TSRMLS_D)
    Clear file stat cache */
 PHP_FUNCTION(clearstatcache)
 {
-       if (ZEND_NUM_ARGS()) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
        php_clear_stat_cache(TSRMLS_C);
 }
index 7728b669f241272f6a17729d859fb26c7505b7c0..be172cefeac01f85425dc30181e1a9b495d65d82 100644 (file)
@@ -246,8 +246,8 @@ static void php_head_apply_header_list_to_hash(void *data, void *arg TSRMLS_DC)
    Return list of headers to be sent / already sent */
 PHP_FUNCTION(headers_list)
 {
-       if (ZEND_NUM_ARGS() > 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        if (!&SG(sapi_headers).headers) {
index d3356e7b64a4cac9f99e922dcbb975696bf9d8ce..f9402c809f9f3a52f51fb847b53839dd37300c52 100644 (file)
@@ -1082,8 +1082,8 @@ PHPAPI char *php_logo_guid(void)
 PHP_FUNCTION(php_logo_guid)
 {
 
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        RETURN_STRING(php_logo_guid(), 0);
@@ -1095,8 +1095,8 @@ PHP_FUNCTION(php_logo_guid)
 PHP_FUNCTION(php_real_logo_guid)
 {
 
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        RETURN_STRINGL(PHP_LOGO_GUID, sizeof(PHP_LOGO_GUID)-1, 1);
@@ -1107,8 +1107,8 @@ PHP_FUNCTION(php_real_logo_guid)
    Return the special ID used to request the PHP logo in phpinfo screens*/
 PHP_FUNCTION(php_egg_logo_guid)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        RETURN_STRINGL(PHP_EGG_LOGO_GUID, sizeof(PHP_EGG_LOGO_GUID)-1, 1);
@@ -1119,8 +1119,8 @@ PHP_FUNCTION(php_egg_logo_guid)
    Return the special ID used to request the Zend logo in phpinfo screens*/
 PHP_FUNCTION(zend_logo_guid)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        RETURN_STRINGL(ZEND_LOGO_GUID, sizeof(ZEND_LOGO_GUID)-1, 1);
@@ -1131,8 +1131,8 @@ PHP_FUNCTION(zend_logo_guid)
    Return the current SAPI module name */
 PHP_FUNCTION(php_sapi_name)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        if (sapi_module.name) {
index 1aa8fce8e61ad359485a81464018161e9c1bb457..d04094b00f654f0da6d2f24e46fba5fffe12cf48 100644 (file)
@@ -351,8 +351,8 @@ PHP_FUNCTION(mt_rand)
    Returns the maximum value a random number can have */
 PHP_FUNCTION(getrandmax)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        RETURN_LONG(PHP_RAND_MAX);
@@ -363,8 +363,8 @@ PHP_FUNCTION(getrandmax)
    Returns the maximum value a random number from Mersenne Twister can have */
 PHP_FUNCTION(mt_getrandmax)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        /*
index 699c59631561bd2d5ef4d32cef59eda20a66d050..ecd18f9aa97d300418b14c00a4f5287dacba0d11 100644 (file)
@@ -520,8 +520,8 @@ PHP_FUNCTION(stream_get_transports)
        int stream_xport_len;
        ulong num_key;
 
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        if ((stream_xport_hash = php_stream_xport_get_hash())) {
@@ -548,8 +548,8 @@ PHP_FUNCTION(stream_get_wrappers)
        int key_flags, stream_protocol_len = 0;
        ulong num_key;
 
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        if ((url_stream_wrappers_hash = php_stream_get_url_stream_wrappers_hash())) {
index 51505e413b17fb9e38c906d254310551f614aa9b..cc52e0ba774c9bf0a97493ce7788905808bd4503 100644 (file)
@@ -4683,8 +4683,8 @@ PHP_FUNCTION(localeconv)
        int len, i;
 
        /* We don't need no stinkin' parameters... */
-       if (ZEND_NUM_ARGS() > 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        MAKE_STD_ZVAL(grouping);
index 351a477ec12c3454d250587c26c6fd2f554d2eb2..392f671ac225a8b8d50880845ba62f776bd4573a 100644 (file)
@@ -203,8 +203,8 @@ static void start_syslog(TSRMLS_D)
    Initializes all syslog-related variables */
 PHP_FUNCTION(define_syslog_variables)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        if (!BG(syslog_started)) {
@@ -243,8 +243,8 @@ PHP_FUNCTION(openlog)
    Close connection to system logger */
 PHP_FUNCTION(closelog)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        closelog();
index ecf36cbc1836ed1df24e07ccaa1272c046e61396..176acb20de2824264db4e3215fabc1c4ad3de20a 100644 (file)
@@ -534,8 +534,8 @@ PHP_FUNCTION(stream_get_filters)
        HashTable *filters_hash;
        ulong num_key;
 
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        array_init(return_value);
index c259ec7ddd344b58eef3bca179d47cd6b059fe0d..7c39854f296d6cb8defb03e20eb703d503e1876d 100644 (file)
@@ -50,8 +50,8 @@
        PHPTidyObj *obj;        \
        TIDY_SET_CONTEXT; \
        if (object) {   \
-               if (ZEND_NUM_ARGS()) {  \
-                       WRONG_PARAM_COUNT;      \
+               if (zend_parse_parameters_none() == FAILURE) {  \
+                       return; \
                }       \
        } else {        \
                if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, NULL, "O", &object, tidy_ce_doc) == FAILURE) {      \
@@ -63,8 +63,8 @@
 #define TIDY_FETCH_ONLY_OBJECT \
        PHPTidyObj *obj;        \
        TIDY_SET_CONTEXT; \
-       if (ZEND_NUM_ARGS()) {  \
-               WRONG_PARAM_COUNT;      \
+       if (zend_parse_parameters_none() == FAILURE) {  \
+               return; \
        }       \
        obj = (PHPTidyObj *) zend_object_store_get_object(object TSRMLS_CC);    \
 
@@ -1204,8 +1204,8 @@ static PHP_FUNCTION(tidy_diagnose)
    Get release date (version) for Tidy library */
 static PHP_FUNCTION(tidy_get_release)
 {
-       if (ZEND_NUM_ARGS()) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        RETURN_STRING((char *)tidyReleaseDate(), 1);
index d90f5aaa87fa8845db3d7e20aac610763946794d..791e624ed39639ba4670242c2acc6c34e76b8d79 100644 (file)
@@ -794,8 +794,8 @@ PHP_FUNCTION(xmlrpc_decode)
    Creates an xmlrpc server */
 PHP_FUNCTION(xmlrpc_server_create)
 {
-       if(ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        if(return_value_used) {
index 378534894037c3369631a3bcf81ca0a78eae6333..fc09ce8fb46ec56c939dd7009570634dc2c4629a 100644 (file)
@@ -464,8 +464,8 @@ static void php_xmlwriter_end(INTERNAL_FUNCTION_PARAMETERS, xmlwriter_read_int_t
        
        if (this) {
                XMLWRITER_FROM_OBJECT(intern, this);
-               if (ZEND_NUM_ARGS()) {
-                       WRONG_PARAM_COUNT;
+               if (zend_parse_parameters_none() == FAILURE) {
+                       return;
                }
        } else 
 #endif
index db82ea10cfdb4250c9009c3f64f7d7189c2198b3..30eb78695b39ea861ed636e9e000b78328812762 100644 (file)
@@ -758,8 +758,8 @@ PHP_FUNCTION(ob_start)
    Flush (send) contents of the output buffer. The last buffer content is sent to next buffer */
 PHP_FUNCTION(ob_flush)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               ZEND_WRONG_PARAM_COUNT();
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        if (!OG(ob_nesting_level)) {
@@ -777,8 +777,8 @@ PHP_FUNCTION(ob_flush)
    Clean (delete) the current output buffer */
 PHP_FUNCTION(ob_clean)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               ZEND_WRONG_PARAM_COUNT();
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
        
        if (!OG(ob_nesting_level)) {
@@ -800,8 +800,8 @@ PHP_FUNCTION(ob_clean)
    Flush (send) the output buffer, and delete current output buffer */
 PHP_FUNCTION(ob_end_flush)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               ZEND_WRONG_PARAM_COUNT();
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
        
        if (!OG(ob_nesting_level)) {
@@ -822,8 +822,8 @@ PHP_FUNCTION(ob_end_flush)
    Clean the output buffer, and delete current output buffer */
 PHP_FUNCTION(ob_end_clean)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               ZEND_WRONG_PARAM_COUNT();
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
                
        if (!OG(ob_nesting_level)) {
@@ -844,8 +844,8 @@ PHP_FUNCTION(ob_end_clean)
    Get current buffer contents, flush (send) the output buffer, and delete current output buffer */
 PHP_FUNCTION(ob_get_flush)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               ZEND_WRONG_PARAM_COUNT();
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        /* get contents */
@@ -870,9 +870,9 @@ PHP_FUNCTION(ob_get_flush)
    Get current buffer contents and delete current output buffer */
 PHP_FUNCTION(ob_get_clean)
 {
-       if (ZEND_NUM_ARGS() != 0)
-                       ZEND_WRONG_PARAM_COUNT();
-               
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        /* get contents */
        if (php_ob_get_buffer(return_value TSRMLS_CC)==FAILURE) {
                RETURN_FALSE;
@@ -895,8 +895,8 @@ PHP_FUNCTION(ob_get_clean)
    Return the contents of the output buffer */
 PHP_FUNCTION(ob_get_contents)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               ZEND_WRONG_PARAM_COUNT();
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
                
        if (php_ob_get_buffer(return_value TSRMLS_CC)==FAILURE) {
@@ -909,8 +909,8 @@ PHP_FUNCTION(ob_get_contents)
    Return the nesting level of the output buffer */
 PHP_FUNCTION(ob_get_level)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               ZEND_WRONG_PARAM_COUNT();
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
                
        RETURN_LONG (OG(ob_nesting_level));
@@ -921,8 +921,8 @@ PHP_FUNCTION(ob_get_level)
    Return the length of the output buffer */
 PHP_FUNCTION(ob_get_length)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               ZEND_WRONG_PARAM_COUNT();
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
                
        if (php_ob_get_length(return_value TSRMLS_CC)==FAILURE) {
index a1e29289fc53b91468eda7574608c59a6829a186..8f165c1577edb310e57d5616d658773f1a16e8f5 100644 (file)
@@ -179,8 +179,8 @@ PHP_FUNCTION(apache_request_headers)
        const apr_array_header_t *arr;
        char *key, *val;
 
-       if (ZEND_NUM_ARGS()) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        array_init(return_value);
@@ -203,8 +203,8 @@ PHP_FUNCTION(apache_response_headers)
        const apr_array_header_t *arr;
        char *key, *val;
 
-       if (ZEND_NUM_ARGS()) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        array_init(return_value);
index ef9dd902af14766a8d71972dc3c09ae28fe96f9b..f59fb97cff09a05dbfdc76962dab828acb22c80e 100644 (file)
@@ -164,8 +164,8 @@ static void apache_request_read_string_slot(int offset, INTERNAL_FUNCTION_PARAME
        request_rec *r;
        char *s;
 
-       if (ZEND_NUM_ARGS() > 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        APREQ_GET_REQUEST(id, r);
@@ -224,8 +224,8 @@ static void apache_request_read_int_slot(int offset, INTERNAL_FUNCTION_PARAMETER
        request_rec *r;
        long l;
 
-       if (ZEND_NUM_ARGS() > 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        APREQ_GET_REQUEST(id, r);
@@ -683,8 +683,8 @@ PHP_FUNCTION(apache_request_server_port)
        zval *id;
        request_rec *r;
 
-       if (ZEND_NUM_ARGS() > 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        APREQ_GET_REQUEST(id, r);
@@ -766,8 +766,8 @@ PHP_FUNCTION(apache_request_set_etag)
        zval *id;
        request_rec *r;
 
-       if (ZEND_NUM_ARGS() > 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        APREQ_GET_REQUEST(id, r);
@@ -784,8 +784,8 @@ PHP_FUNCTION(apache_request_set_last_modified)
        zval *id;
        request_rec *r;
 
-       if (ZEND_NUM_ARGS() > 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        APREQ_GET_REQUEST(id, r);
@@ -802,8 +802,8 @@ PHP_FUNCTION(apache_request_meets_conditions)
        zval *id;
        request_rec *r;
 
-       if (ZEND_NUM_ARGS() > 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        APREQ_GET_REQUEST(id, r);
@@ -819,8 +819,8 @@ PHP_FUNCTION(apache_request_discard_request_body)
        zval *id;
        request_rec *r;
 
-       if (ZEND_NUM_ARGS() > 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        APREQ_GET_REQUEST(id, r);
@@ -836,8 +836,8 @@ PHP_FUNCTION(apache_request_satisfies)
        zval *id;
        request_rec *r;
 
-       if (ZEND_NUM_ARGS() > 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        APREQ_GET_REQUEST(id, r);
@@ -854,8 +854,8 @@ PHP_FUNCTION(apache_request_is_initial_req)
        zval *id;
        request_rec *r;
 
-       if (ZEND_NUM_ARGS() > 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        APREQ_GET_REQUEST(id, r);
@@ -871,8 +871,8 @@ PHP_FUNCTION(apache_request_some_auth_required)
        zval *id;
        request_rec *r;
 
-       if (ZEND_NUM_ARGS() > 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        APREQ_GET_REQUEST(id, r);
@@ -889,8 +889,8 @@ PHP_FUNCTION(apache_request_auth_type)
        request_rec *r;
        char *t;
 
-       if (ZEND_NUM_ARGS() > 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        APREQ_GET_REQUEST(id, r);
@@ -911,8 +911,8 @@ PHP_FUNCTION(apache_request_auth_name)
        request_rec *r;
        char *t;
 
-       if (ZEND_NUM_ARGS() > 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        APREQ_GET_REQUEST(id, r);