File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -159,8 +159,12 @@ static inline Variant getCallArg(uint32_t i) {
159159 return {ZEND_CALL_ARG (EG (current_execute_data), i + 1 ), Ctor::CopyRef};
160160}
161161
162+ static inline uint32_t getCallArgNum () {
163+ return ZEND_CALL_NUM_ARGS (EG (current_execute_data));
164+ }
165+
162166static inline Variant getCallArg (uint32_t i, const Variant &defaultValue) {
163- if (i >= ZEND_CALL_NUM_ARGS ( EG (current_execute_data) )) {
167+ if (i >= getCallArgNum ( )) {
164168 return defaultValue;
165169 } else {
166170 return getCallArg (i);
Original file line number Diff line number Diff line change @@ -601,12 +601,12 @@ TEST(object, enum_class) {
601601}
602602
603603TEST (object, exec) {
604- auto obj = newObject (" DateTime" , " 2000-01-01" );
605- auto fn = getMethod (obj.ce (), " format" );
606- auto rs = obj.exec (fn, {" Y-m-d H:i:s" });
604+ auto obj = newObject (" DateTime" , " 2000-01-01" );
605+ auto fn = getMethod (obj.ce (), " format" );
606+ auto rs = obj.exec (fn, {" Y-m-d H:i:s" });
607607 ASSERT_STREQ (rs.toCString (), " 2000-01-01 00:00:00" );
608608
609- auto fn2 = getMethod (obj.ce (), " getTimestamp" );
610- auto rs2 = obj.exec (fn2);
609+ auto fn2 = getMethod (obj.ce (), " getTimestamp" );
610+ auto rs2 = obj.exec (fn2);
611611 ASSERT_GT (rs2.toInt (), 100000000 );
612612}
You can’t perform that action at this time.
0 commit comments