@@ -1960,24 +1960,6 @@ int php_register_extensions(zend_module_entry * const * ptr, int count)
1960
1960
return SUCCESS ;
1961
1961
}
1962
1962
1963
- /* A very long time ago php_module_startup() was refactored in a way
1964
- * which broke calling it with more than one additional module.
1965
- * This alternative to php_register_extensions() works around that
1966
- * by walking the shallower structure.
1967
- *
1968
- * See algo: https://bugs.php.net/bug.php?id=63159
1969
- */
1970
- static int php_register_extensions_bc (zend_module_entry * ptr , int count )
1971
- {
1972
- while (count -- ) {
1973
- if (zend_register_internal_module (ptr ++ ) == NULL ) {
1974
- return FAILURE ;
1975
- }
1976
- }
1977
- return SUCCESS ;
1978
- }
1979
- /* }}} */
1980
-
1981
1963
#ifdef PHP_WIN32
1982
1964
static _invalid_parameter_handler old_invalid_parameter_handler ;
1983
1965
@@ -2012,11 +1994,12 @@ void dummy_invalid_parameter_handler(
2012
1994
#endif
2013
1995
2014
1996
/* {{{ php_module_startup */
2015
- int php_module_startup (sapi_module_struct * sf , zend_module_entry * additional_modules , uint32_t num_additional_modules )
1997
+ zend_result php_module_startup (sapi_module_struct * sf , zend_module_entry * additional_module )
2016
1998
{
2017
1999
zend_utility_functions zuf ;
2018
2000
zend_utility_values zuv ;
2019
- int retval = SUCCESS , module_number = 0 ; /* for REGISTER_INI_ENTRIES() */
2001
+ zend_result retval = SUCCESS ;
2002
+ int module_number = 0 ; /* for REGISTER_INI_ENTRIES() */
2020
2003
char * php_os ;
2021
2004
zend_module_entry * module ;
2022
2005
@@ -2243,7 +2226,9 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod
2243
2226
}
2244
2227
2245
2228
/* start additional PHP extensions */
2246
- php_register_extensions_bc (additional_modules , num_additional_modules );
2229
+ if (additional_module && (zend_register_internal_module (additional_module ) == NULL )) {
2230
+ return FAILURE ;
2231
+ }
2247
2232
2248
2233
/* load and startup extensions compiled as shared objects (aka DLLs)
2249
2234
as requested by php.ini entries
@@ -2278,7 +2263,7 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod
2278
2263
module -> version = PHP_VERSION ;
2279
2264
module -> info_func = PHP_MINFO (php_core );
2280
2265
}
2281
-
2266
+
2282
2267
/* freeze the list of observer fcall_init handlers */
2283
2268
zend_observer_post_startup ();
2284
2269
0 commit comments