File tree Expand file tree Collapse file tree 4 files changed +8
-6
lines changed
Expand file tree Collapse file tree 4 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -130,7 +130,9 @@ ZEND_API bool zend_autoload_unregister_class_loader(const zend_fcall_info_cache
130130 return false;
131131}
132132
133- ZEND_API zend_array * zend_autoload_fcc_map_to_callable_zval_map (void ) {
133+ /* We do not return a HashTable* because zend_empty_array is not collectable,
134+ * therefore the zval holding this value must do so. Something that ZVAL_EMPTY_ARRAY(); does. */
135+ ZEND_API void zend_autoload_fcc_map_to_callable_zval_map (zval * return_value ) {
134136 if (zend_class_autoload_functions ) {
135137 zend_fcall_info_cache * fcc ;
136138
@@ -140,9 +142,9 @@ ZEND_API zend_array* zend_autoload_fcc_map_to_callable_zval_map(void) {
140142 zend_get_callable_zval_from_fcc (fcc , & tmp );
141143 zend_hash_next_index_insert (map , & tmp );
142144 } ZEND_HASH_FOREACH_END ();
143- return map ;
145+ RETURN_ARR ( map ) ;
144146 }
145- return ( zend_array * ) & zend_empty_array ;
147+ RETURN_EMPTY_ARRAY () ;
146148}
147149
148150/* Only for deprecated strange behaviour of spl_autoload_unregister() */
Original file line number Diff line number Diff line change 2424ZEND_API zend_class_entry * zend_perform_class_autoload (zend_string * class_name , zend_string * lc_name );
2525ZEND_API void zend_autoload_register_class_loader (zend_fcall_info_cache * fcc , bool prepend );
2626ZEND_API bool zend_autoload_unregister_class_loader (const zend_fcall_info_cache * fcc );
27- ZEND_API zend_array * zend_autoload_fcc_map_to_callable_zval_map (void );
27+ ZEND_API void zend_autoload_fcc_map_to_callable_zval_map (zval * return_value );
2828/* Only for deprecated strange behaviour of spl_autoload_unregister() */
2929ZEND_API void zend_autoload_clean_class_loaders (void );
3030void zend_autoload_shutdown (void );
Original file line number Diff line number Diff line change @@ -432,7 +432,7 @@ PHP_FUNCTION(spl_autoload_functions)
432432{
433433 ZEND_PARSE_PARAMETERS_NONE ();
434434
435- RETURN_ARR ( zend_autoload_fcc_map_to_callable_zval_map () );
435+ zend_autoload_fcc_map_to_callable_zval_map (return_value );
436436} /* }}} */
437437
438438/* {{{ Return hash id for given object */
Original file line number Diff line number Diff line change @@ -2014,7 +2014,7 @@ void php_request_shutdown(void *dummy)
20142014 php_free_shutdown_functions ();
20152015 }
20162016
2017- /* 8. Shutdown autoloader, freeing all hold functions/closures */
2017+ /* 8. Shutdown autoloader, freeing all held functions/closures */
20182018 zend_autoload_shutdown ();
20192019
20202020 /* 9. Destroy super-globals */
You can’t perform that action at this time.
0 commit comments