mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Remove useless check
This commit is contained in:
parent
84b997020e
commit
0adbf6de77
1 changed files with 3 additions and 34 deletions
|
@ -104,7 +104,7 @@ ZEND_DECLARE_MODULE_GLOBALS(reflection)
|
|||
|
||||
#define GET_REFLECTION_OBJECT() \
|
||||
intern = Z_REFLECTION_P(getThis()); \
|
||||
if (intern == NULL || intern->ptr == NULL) { \
|
||||
if (intern->ptr == NULL) { \
|
||||
RETURN_ON_EXCEPTION \
|
||||
php_error_docref(NULL, E_ERROR, "Internal error: Failed to retrieve the reflection object"); \
|
||||
} \
|
||||
|
@ -1459,7 +1459,7 @@ static parameter_reference *_reflection_param_get_default_param(INTERNAL_FUNCTIO
|
|||
parameter_reference *param;
|
||||
|
||||
intern = Z_REFLECTION_P(getThis());
|
||||
if (intern == NULL || intern->ptr == NULL) {
|
||||
if (intern->ptr == NULL) {
|
||||
if (EG(exception) && EG(exception)->ce == reflection_exception_ptr) {
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1613,9 +1613,6 @@ ZEND_METHOD(reflection_function, __construct)
|
|||
|
||||
object = getThis();
|
||||
intern = Z_REFLECTION_P(object);
|
||||
if (intern == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "O", &closure, zend_ce_closure) == SUCCESS) {
|
||||
fptr = (zend_function*)zend_get_closure_method_def(closure);
|
||||
|
@ -2157,9 +2154,6 @@ ZEND_METHOD(reflection_generator, __construct)
|
|||
|
||||
object = getThis();
|
||||
intern = Z_REFLECTION_P(object);
|
||||
if (intern == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "O", &generator, zend_ce_generator) == FAILURE) {
|
||||
return;
|
||||
|
@ -2346,9 +2340,6 @@ ZEND_METHOD(reflection_parameter, __construct)
|
|||
|
||||
object = getThis();
|
||||
intern = Z_REFLECTION_P(object);
|
||||
if (intern == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* First, find the function */
|
||||
switch (Z_TYPE_P(reference)) {
|
||||
|
@ -3051,9 +3042,6 @@ ZEND_METHOD(reflection_method, __construct)
|
|||
|
||||
object = getThis();
|
||||
intern = Z_REFLECTION_P(object);
|
||||
if (intern == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Find the class entry */
|
||||
switch (Z_TYPE_P(classname)) {
|
||||
|
@ -3660,10 +3648,6 @@ ZEND_METHOD(reflection_method, setAccessible)
|
|||
|
||||
intern = Z_REFLECTION_P(getThis());
|
||||
|
||||
if (intern == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
intern->ignore_visibility = visible;
|
||||
}
|
||||
/* }}} */
|
||||
|
@ -3697,9 +3681,6 @@ static void reflection_class_object_ctor(INTERNAL_FUNCTION_PARAMETERS, int is_ob
|
|||
|
||||
object = getThis();
|
||||
intern = Z_REFLECTION_P(object);
|
||||
if (intern == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Z_TYPE_P(argument) == IS_OBJECT) {
|
||||
ZVAL_STR_COPY(&classname, Z_OBJCE_P(argument)->name);
|
||||
|
@ -5191,9 +5172,6 @@ ZEND_METHOD(reflection_property, __construct)
|
|||
|
||||
object = getThis();
|
||||
intern = Z_REFLECTION_P(object);
|
||||
if (intern == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Find the class entry */
|
||||
switch (Z_TYPE_P(classname)) {
|
||||
|
@ -5542,10 +5520,6 @@ ZEND_METHOD(reflection_property, setAccessible)
|
|||
|
||||
intern = Z_REFLECTION_P(getThis());
|
||||
|
||||
if (intern == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
intern->ignore_visibility = visible;
|
||||
}
|
||||
/* }}} */
|
||||
|
@ -5577,9 +5551,7 @@ ZEND_METHOD(reflection_extension, __construct)
|
|||
|
||||
object = getThis();
|
||||
intern = Z_REFLECTION_P(object);
|
||||
if (intern == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
lcname = do_alloca(name_len + 1, use_heap);
|
||||
zend_str_tolower_copy(lcname, name_str, name_len);
|
||||
if ((module = zend_hash_str_find_ptr(&module_registry, lcname, name_len)) == NULL) {
|
||||
|
@ -5945,9 +5917,6 @@ ZEND_METHOD(reflection_zend_extension, __construct)
|
|||
|
||||
object = getThis();
|
||||
intern = Z_REFLECTION_P(object);
|
||||
if (intern == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
extension = zend_get_extension(name_str);
|
||||
if (!extension) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue