Skip to content

Commit dab3b02

Browse files
committed
Make sure core module has number 0
Some places, possibly also outside PHP, assume the core extension has module number 0. After 8a812c3 this wasn't the case anymore as reported in [1]. Fix it by changing how the next module ID is computed. [1] php#12246 (comment)
1 parent f6fae19 commit dab3b02

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Zend/zend_API.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3271,7 +3271,7 @@ ZEND_API void zend_post_deactivate_modules(void) /* {{{ */
32713271
/* return the next free module number */
32723272
ZEND_API int zend_next_free_module(void) /* {{{ */
32733273
{
3274-
return zend_hash_num_elements(&module_registry) + 1;
3274+
return zend_hash_num_elements(&module_registry);
32753275
}
32763276
/* }}} */
32773277

0 commit comments

Comments
 (0)