File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -1123,7 +1123,7 @@ PHP_FUNCTION(ibase_drop_db)
11231123PHP_FUNCTION (ibase_trans )
11241124{
11251125 unsigned short i , link_cnt = 0 , tpb_len = 0 ;
1126- int argn ;
1126+ int argn = ZEND_NUM_ARGS () ;
11271127 char last_tpb [TPB_MAX_SIZE ];
11281128 ibase_db_link * * ib_link = NULL ;
11291129 ibase_trans * ib_trans ;
@@ -1132,8 +1132,6 @@ PHP_FUNCTION(ibase_trans)
11321132
11331133 RESET_ERRMSG ;
11341134
1135- argn = ZEND_NUM_ARGS ();
1136-
11371135 /* (1+argn) is an upper bound for the number of links this trans connects to */
11381136 ib_link = (ibase_db_link * * ) safe_emalloc (sizeof (ibase_db_link * ),1 + argn ,0 );
11391137
@@ -1143,7 +1141,7 @@ PHP_FUNCTION(ibase_trans)
11431141 ISC_TEB * teb ;
11441142 zval * args = NULL ;
11451143
1146- if (zend_parse_parameters (ZEND_NUM_ARGS () , "+" , & args , & argn ) == FAILURE ) {
1144+ if (zend_parse_parameters (argn , "+" , & args , & argn ) == FAILURE ) {
11471145 efree (ib_link );
11481146 RETURN_FALSE ;
11491147 }
You can’t perform that action at this time.
0 commit comments