@@ -89,8 +89,7 @@ PHPAPI zend_class_entry *reflection_reference_ptr;
89
89
90
90
/* Exception throwing macro */
91
91
#define _DO_THROW (msg ) \
92
- zend_throw_exception(reflection_exception_ptr, msg, 0); \
93
- return;
92
+ zend_throw_exception(reflection_exception_ptr, msg, 0);
94
93
95
94
#define GET_REFLECTION_OBJECT () do { \
96
95
intern = Z_REFLECTION_P(ZEND_THIS); \
@@ -1305,6 +1304,7 @@ static void _reflection_export(INTERNAL_FUNCTION_PARAMETERS, zend_class_entry *c
1305
1304
/* Create object */
1306
1305
if (object_init_ex (& reflector , ce_ptr ) == FAILURE ) {
1307
1306
_DO_THROW ("Could not create reflector" );
1307
+ return ;
1308
1308
}
1309
1309
1310
1310
/* Call __construct() */
@@ -1332,6 +1332,7 @@ static void _reflection_export(INTERNAL_FUNCTION_PARAMETERS, zend_class_entry *c
1332
1332
if (result == FAILURE ) {
1333
1333
zval_ptr_dtor (& reflector );
1334
1334
_DO_THROW ("Could not create reflector" );
1335
+ return ;
1335
1336
}
1336
1337
1337
1338
/* Call static reflection::export */
@@ -1353,6 +1354,7 @@ static void _reflection_export(INTERNAL_FUNCTION_PARAMETERS, zend_class_entry *c
1353
1354
zval_ptr_dtor (& reflector );
1354
1355
zval_ptr_dtor (& retval );
1355
1356
_DO_THROW ("Could not execute reflection::export()" );
1357
+ return ;
1356
1358
}
1357
1359
1358
1360
if (return_output ) {
@@ -1439,7 +1441,7 @@ ZEND_METHOD(reflection, export)
1439
1441
1440
1442
if (result == FAILURE ) {
1441
1443
_DO_THROW ("Invocation of method __toString() failed" );
1442
- /* Returns from this function */
1444
+ return ;
1443
1445
}
1444
1446
1445
1447
if (Z_TYPE (retval ) == IS_UNDEF ) {
@@ -2286,7 +2288,7 @@ ZEND_METHOD(reflection_parameter, __construct)
2286
2288
|| ((method = zend_hash_index_find (Z_ARRVAL_P (reference ), 1 )) == NULL ))
2287
2289
{
2288
2290
_DO_THROW ("Expected array($object, $method) or array($classname, $method)" );
2289
- /* returns out of this function */
2291
+ return ;
2290
2292
}
2291
2293
2292
2294
if (Z_TYPE_P (classref ) == IS_OBJECT ) {
@@ -2334,7 +2336,7 @@ ZEND_METHOD(reflection_parameter, __construct)
2334
2336
2335
2337
default :
2336
2338
_DO_THROW ("The parameter class is expected to be either a string, an array(class, method) or a callable object" );
2337
- /* returns out of this function */
2339
+ return ;
2338
2340
}
2339
2341
2340
2342
/* Now, search for the parameter */
@@ -2356,7 +2358,7 @@ ZEND_METHOD(reflection_parameter, __construct)
2356
2358
zval_ptr_dtor (reference );
2357
2359
}
2358
2360
_DO_THROW ("The parameter specified by its offset could not be found" );
2359
- /* returns out of this function */
2361
+ return ;
2360
2362
}
2361
2363
} else {
2362
2364
uint32_t i ;
@@ -2395,7 +2397,7 @@ ZEND_METHOD(reflection_parameter, __construct)
2395
2397
zval_ptr_dtor (reference );
2396
2398
}
2397
2399
_DO_THROW ("The parameter specified by its name could not be found" );
2398
- /* returns out of this function */
2400
+ return ;
2399
2401
}
2400
2402
}
2401
2403
@@ -2980,7 +2982,7 @@ ZEND_METHOD(reflection_method, __construct)
2980
2982
zval_ptr_dtor_str (& ztmp );
2981
2983
}
2982
2984
_DO_THROW ("The parameter class is expected to be either a string or an object" );
2983
- /* returns out of this function */
2985
+ return ;
2984
2986
}
2985
2987
2986
2988
if (classname == & ztmp ) {
@@ -3048,7 +3050,7 @@ ZEND_METHOD(reflection_method, getClosure)
3048
3050
3049
3051
if (!instanceof_function (Z_OBJCE_P (obj ), mptr -> common .scope )) {
3050
3052
_DO_THROW ("Given object is not an instance of the class this method was declared in" );
3051
- /* Returns from this function */
3053
+ return ;
3052
3054
}
3053
3055
3054
3056
/* This is an original closure object and __invoke is to be called. */
@@ -3137,7 +3139,7 @@ static void reflection_method_invoke(INTERNAL_FUNCTION_PARAMETERS, int variadic)
3137
3139
efree (params );
3138
3140
}
3139
3141
_DO_THROW ("Given object is not an instance of the class this method was declared in" );
3140
- /* Returns from this function */
3142
+ return ;
3141
3143
}
3142
3144
}
3143
3145
@@ -3520,7 +3522,7 @@ ZEND_METHOD(reflection_class_constant, __construct)
3520
3522
3521
3523
default :
3522
3524
_DO_THROW ("The parameter class is expected to be either a string or an object" );
3523
- /* returns out of this function */
3525
+ return ;
3524
3526
}
3525
3527
3526
3528
if ((constant = zend_hash_find_ptr (& ce -> constants_table , constname )) == NULL ) {
@@ -5242,7 +5244,7 @@ ZEND_METHOD(reflection_property, __construct)
5242
5244
5243
5245
default :
5244
5246
_DO_THROW ("The parameter class is expected to be either a string or an object" );
5245
- /* returns out of this function */
5247
+ return ;
5246
5248
}
5247
5249
5248
5250
property_info = zend_hash_find_ptr (& ce -> properties_info , name );
@@ -5439,7 +5441,7 @@ ZEND_METHOD(reflection_property, getValue)
5439
5441
5440
5442
if (!instanceof_function (Z_OBJCE_P (object ), ref -> prop .ce )) {
5441
5443
_DO_THROW ("Given object is not an instance of the class this property was declared in" );
5442
- /* Returns from this function */
5444
+ return ;
5443
5445
}
5444
5446
5445
5447
member_p = zend_read_property_ex (intern -> ce , object , ref -> unmangled_name , 0 , & rv );
@@ -5527,7 +5529,7 @@ ZEND_METHOD(reflection_property, isInitialized)
5527
5529
5528
5530
if (!instanceof_function (Z_OBJCE_P (object ), ref -> prop .ce )) {
5529
5531
_DO_THROW ("Given object is not an instance of the class this property was declared in" );
5530
- /* Returns from this function */
5532
+ return ;
5531
5533
}
5532
5534
5533
5535
old_scope = EG (fake_scope );
@@ -6191,6 +6193,7 @@ ZEND_METHOD(reflection_reference, fromArrayElement)
6191
6193
6192
6194
if (!item ) {
6193
6195
_DO_THROW ("Array key not found" );
6196
+ return ;
6194
6197
}
6195
6198
6196
6199
if (Z_TYPE_P (item ) != IS_REFERENCE ) {
@@ -6220,6 +6223,7 @@ ZEND_METHOD(reflection_reference, getId)
6220
6223
intern = Z_REFLECTION_P (getThis ());
6221
6224
if (Z_TYPE (intern -> obj ) != IS_REFERENCE ) {
6222
6225
_DO_THROW ("Corrupted ReflectionReference object" );
6226
+ return ;
6223
6227
}
6224
6228
6225
6229
if (!REFLECTION_G (key_initialized )) {
0 commit comments