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)
21562156/* {{{ php_sxe_find_fptr_count() */
21572157static zend_function * php_sxe_find_fptr_count (zend_class_entry * ce )
21582158{
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 ;
21662163 }
2167- parent = parent -> parent ;
2168- inherited = 1 ;
21692164 }
21702165
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 ;
21802167}
21812168/* }}} */
21822169
You can’t perform that action at this time.
0 commit comments