@@ -1630,9 +1630,14 @@ void php_oci_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent, int exclus
1630
1630
zend_long session_mode = OCI_DEFAULT ;
1631
1631
1632
1632
/* if a fourth parameter is handed over, it is the charset identifier (but is only used in Oracle 9i+) */
1633
- if (zend_parse_parameters (ZEND_NUM_ARGS (), "ss|ssl" , & username , & username_len , & password , & password_len , & dbname , & dbname_len , & charset , & charset_len , & session_mode ) == FAILURE ) {
1634
- return ;
1635
- }
1633
+ ZEND_PARSE_PARAMETERS_START (2 , 5 )
1634
+ Z_PARAM_STRING (username , username_len )
1635
+ Z_PARAM_STRING (password , password_len )
1636
+ Z_PARAM_OPTIONAL
1637
+ Z_PARAM_STRING (dbname , dbname_len )
1638
+ Z_PARAM_STRING (charset , charset_len )
1639
+ Z_PARAM_LONG (session_mode )
1640
+ ZEND_PARSE_PARAMETERS_END ();
1636
1641
1637
1642
#ifdef HAVE_OCI8_DTRACE
1638
1643
if (DTRACE_OCI8_CONNECT_ENTRY_ENABLED ()) {
@@ -2547,9 +2552,12 @@ void php_oci_fetch_row (INTERNAL_FUNCTION_PARAMETERS, int mode, int expected_arg
2547
2552
if (expected_args > 2 ) {
2548
2553
/* only for ocifetchinto BC */
2549
2554
2550
- if (zend_parse_parameters (ZEND_NUM_ARGS (), "rz|l" , & z_statement , & array , & fetch_mode ) == FAILURE ) {
2551
- return ;
2552
- }
2555
+ ZEND_PARSE_PARAMETERS_START (2 , 3 )
2556
+ Z_PARAM_RESOURCE (z_statement )
2557
+ Z_PARAM_ZVAL (array )
2558
+ Z_PARAM_OPTIONAL
2559
+ Z_PARAM_LONG (fetch_mode )
2560
+ ZEND_PARSE_PARAMETERS_END ();
2553
2561
2554
2562
if (ZEND_NUM_ARGS () == 2 ) {
2555
2563
fetch_mode = mode ;
@@ -2563,19 +2571,21 @@ void php_oci_fetch_row (INTERNAL_FUNCTION_PARAMETERS, int mode, int expected_arg
2563
2571
} else if (expected_args == 2 ) {
2564
2572
/* only for oci_fetch_array() */
2565
2573
2566
- if (zend_parse_parameters (ZEND_NUM_ARGS (), "r|l" , & z_statement , & fetch_mode ) == FAILURE ) {
2567
- return ;
2568
- }
2574
+ ZEND_PARSE_PARAMETERS_START (1 , 2 )
2575
+ Z_PARAM_RESOURCE (z_statement )
2576
+ Z_PARAM_OPTIONAL
2577
+ Z_PARAM_LONG (fetch_mode )
2578
+ ZEND_PARSE_PARAMETERS_END ();
2569
2579
2570
2580
if (ZEND_NUM_ARGS () == 1 ) {
2571
2581
fetch_mode = mode ;
2572
2582
}
2573
2583
} else {
2574
2584
/* for all oci_fetch_*() */
2575
2585
2576
- if ( zend_parse_parameters ( ZEND_NUM_ARGS (), "r" , & z_statement ) == FAILURE ) {
2577
- return ;
2578
- }
2586
+ ZEND_PARSE_PARAMETERS_START ( 1 , 1 )
2587
+ Z_PARAM_RESOURCE ( z_statement )
2588
+ ZEND_PARSE_PARAMETERS_END ();
2579
2589
2580
2590
fetch_mode = mode ;
2581
2591
}
0 commit comments