diff options
-rw-r--r-- | ext/mysqli/mysqli_fe.h | 2 | ||||
-rw-r--r-- | ext/mysqli/tests/mysqli_class_mysqli_driver_interface.phpt | 9 | ||||
-rw-r--r-- | ext/reflection/php_reflection.c | 32 |
3 files changed, 18 insertions, 25 deletions
diff --git a/ext/mysqli/mysqli_fe.h b/ext/mysqli/mysqli_fe.h index 0292dca64f..c6e8293d1a 100644 --- a/ext/mysqli/mysqli_fe.h +++ b/ext/mysqli/mysqli_fe.h @@ -101,8 +101,6 @@ PHP_FUNCTION(mysqli_stmt_prepare); PHP_FUNCTION(mysqli_stmt_fetch); PHP_FUNCTION(mysqli_stmt_param_count); PHP_FUNCTION(mysqli_stmt_send_long_data); -PHP_FUNCTION(mysqli_embedded_server_end); -PHP_FUNCTION(mysqli_embedded_server_start); PHP_FUNCTION(mysqli_sqlstate); PHP_FUNCTION(mysqli_ssl_set); PHP_FUNCTION(mysqli_stat); diff --git a/ext/mysqli/tests/mysqli_class_mysqli_driver_interface.phpt b/ext/mysqli/tests/mysqli_class_mysqli_driver_interface.phpt index 681590e1ab..78784210bb 100644 --- a/ext/mysqli/tests/mysqli_class_mysqli_driver_interface.phpt +++ b/ext/mysqli/tests/mysqli_class_mysqli_driver_interface.phpt @@ -20,15 +20,6 @@ require_once('skipifconnectfailure.inc'); $methods = get_class_methods($driver); $expected_methods = array(); - if (!$IS_MYSQLND && (isset($methods['embedded_server_start']))) { - /* libmysql only - needs extra compile flag, no way to check properly in the - PHP user land if its compiled in or not */ - $expected_methods = array_merge($expected_methods, array( - 'embedded_server_start' => true, - 'embedded_server_end' => true, - )); - } - foreach ($methods as $k => $method) { if (isset($expected_methods[$method])) { unset($expected_methods[$method]); diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 1f825e65d4..0510994b89 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -86,8 +86,7 @@ PHPAPI zend_class_entry *reflection_reference_ptr; /* Exception throwing macro */ #define _DO_THROW(msg) \ - zend_throw_exception(reflection_exception_ptr, msg, 0); \ - return; + zend_throw_exception(reflection_exception_ptr, msg, 0); #define GET_REFLECTION_OBJECT() do { \ intern = Z_REFLECTION_P(ZEND_THIS); \ @@ -1302,6 +1301,7 @@ static void _reflection_export(INTERNAL_FUNCTION_PARAMETERS, zend_class_entry *c /* Create object */ if (object_init_ex(&reflector, ce_ptr) == FAILURE) { _DO_THROW("Could not create reflector"); + return; } /* Call __construct() */ @@ -1329,6 +1329,7 @@ static void _reflection_export(INTERNAL_FUNCTION_PARAMETERS, zend_class_entry *c if (result == FAILURE) { zval_ptr_dtor(&reflector); _DO_THROW("Could not create reflector"); + return; } /* Call static reflection::export */ @@ -1350,6 +1351,7 @@ static void _reflection_export(INTERNAL_FUNCTION_PARAMETERS, zend_class_entry *c zval_ptr_dtor(&reflector); zval_ptr_dtor(&retval); _DO_THROW("Could not execute reflection::export()"); + return; } if (return_output) { @@ -1436,7 +1438,7 @@ ZEND_METHOD(reflection, export) if (result == FAILURE) { _DO_THROW("Invocation of method __toString() failed"); - /* Returns from this function */ + return; } if (Z_TYPE(retval) == IS_UNDEF) { @@ -2283,7 +2285,7 @@ ZEND_METHOD(reflection_parameter, __construct) || ((method = zend_hash_index_find(Z_ARRVAL_P(reference), 1)) == NULL)) { _DO_THROW("Expected array($object, $method) or array($classname, $method)"); - /* returns out of this function */ + return; } if (Z_TYPE_P(classref) == IS_OBJECT) { @@ -2331,7 +2333,7 @@ ZEND_METHOD(reflection_parameter, __construct) default: _DO_THROW("The parameter class is expected to be either a string, an array(class, method) or a callable object"); - /* returns out of this function */ + return; } /* Now, search for the parameter */ @@ -2351,7 +2353,7 @@ ZEND_METHOD(reflection_parameter, __construct) zval_ptr_dtor(reference); } _DO_THROW("The parameter specified by its offset could not be found"); - /* returns out of this function */ + return; } } else { uint32_t i; @@ -2388,7 +2390,7 @@ ZEND_METHOD(reflection_parameter, __construct) zval_ptr_dtor(reference); } _DO_THROW("The parameter specified by its name could not be found"); - /* returns out of this function */ + return; } } @@ -2973,7 +2975,7 @@ ZEND_METHOD(reflection_method, __construct) zval_ptr_dtor_str(&ztmp); } _DO_THROW("The parameter class is expected to be either a string or an object"); - /* returns out of this function */ + return; } if (classname == &ztmp) { @@ -3041,7 +3043,7 @@ ZEND_METHOD(reflection_method, getClosure) if (!instanceof_function(Z_OBJCE_P(obj), mptr->common.scope)) { _DO_THROW("Given object is not an instance of the class this method was declared in"); - /* Returns from this function */ + return; } /* This is an original closure object and __invoke is to be called. */ @@ -3130,7 +3132,7 @@ static void reflection_method_invoke(INTERNAL_FUNCTION_PARAMETERS, int variadic) efree(params); } _DO_THROW("Given object is not an instance of the class this method was declared in"); - /* Returns from this function */ + return; } } @@ -3513,7 +3515,7 @@ ZEND_METHOD(reflection_class_constant, __construct) default: _DO_THROW("The parameter class is expected to be either a string or an object"); - /* returns out of this function */ + return; } if ((constant = zend_hash_find_ptr(&ce->constants_table, constname)) == NULL) { @@ -5231,7 +5233,7 @@ ZEND_METHOD(reflection_property, __construct) default: _DO_THROW("The parameter class is expected to be either a string or an object"); - /* returns out of this function */ + return; } property_info = zend_hash_find_ptr(&ce->properties_info, name); @@ -5428,7 +5430,7 @@ ZEND_METHOD(reflection_property, getValue) if (!instanceof_function(Z_OBJCE_P(object), ref->prop.ce)) { _DO_THROW("Given object is not an instance of the class this property was declared in"); - /* Returns from this function */ + return; } member_p = zend_read_property_ex(intern->ce, object, ref->unmangled_name, 0, &rv); @@ -5515,7 +5517,7 @@ ZEND_METHOD(reflection_property, isInitialized) if (!instanceof_function(Z_OBJCE_P(object), ref->prop.ce)) { _DO_THROW("Given object is not an instance of the class this property was declared in"); - /* Returns from this function */ + return; } old_scope = EG(fake_scope); @@ -6178,6 +6180,7 @@ ZEND_METHOD(reflection_reference, fromArrayElement) if (!item) { _DO_THROW("Array key not found"); + return; } if (Z_TYPE_P(item) != IS_REFERENCE) { @@ -6207,6 +6210,7 @@ ZEND_METHOD(reflection_reference, getId) intern = Z_REFLECTION_P(getThis()); if (Z_TYPE(intern->obj) != IS_REFERENCE) { _DO_THROW("Corrupted ReflectionReference object"); + return; } if (!REFLECTION_G(key_initialized)) { |