File tree Expand file tree Collapse file tree 1 file changed +5
-18
lines changed Expand file tree Collapse file tree 1 file changed +5
-18
lines changed Original file line number Diff line number Diff line change @@ -2156,27 +2156,14 @@ static void sxe_object_free_storage(zend_object *object)
2156
2156
/* {{{ php_sxe_find_fptr_count() */
2157
2157
static zend_function * php_sxe_find_fptr_count (zend_class_entry * ce )
2158
2158
{
2159
- zend_function * fptr_count = NULL ;
2160
- zend_class_entry * parent = ce ;
2161
- int inherited = 0 ;
2162
-
2163
- while (parent ) {
2164
- if (parent == ce_SimpleXMLElement ) {
2165
- break ;
2159
+ if (ce -> type == ZEND_USER_CLASS ) {
2160
+ zend_function * fptr_count = zend_hash_find_ptr (& ce -> function_table , ZSTR_KNOWN (ZEND_STR_COUNT ));
2161
+ if (fptr_count -> common .scope != ce_SimpleXMLElement ) {
2162
+ return fptr_count ;
2166
2163
}
2167
- parent = parent -> parent ;
2168
- inherited = 1 ;
2169
2164
}
2170
2165
2171
- if (inherited ) {
2172
- /* Find count() method */
2173
- fptr_count = zend_hash_find_ptr (& ce -> function_table , ZSTR_KNOWN (ZEND_STR_COUNT ));
2174
- if (fptr_count -> common .scope == parent ) {
2175
- fptr_count = NULL ;
2176
- }
2177
- }
2178
-
2179
- return fptr_count ;
2166
+ return NULL ;
2180
2167
}
2181
2168
/* }}} */
2182
2169
You can’t perform that action at this time.
0 commit comments