Skip to content

Commit cd7a656

Browse files
committed
- Optional dependency for SPL must be specified in header
1 parent 44552ae commit cd7a656

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

ext/mysqli/mysqli.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,20 @@ PHP_MYSQLI_EXPORT(zend_object_value) mysqli_objects_new(zend_class_entry *class_
425425

426426
/* {{{ mysqli_module_entry
427427
*/
428+
static zend_module_dep mysqli_deps[] = {
429+
#if defined(HAVE_SPL) && ((PHP_MAJOR_VERSION > 5) || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 1))
430+
ZEND_MOD_REQUIRED("spl")
431+
#endif
432+
{NULL, NULL, NULL}
433+
};
434+
428435
zend_module_entry mysqli_module_entry = {
436+
#if ZEND_MODULE_API_NO >= 20050922
437+
STANDARD_MODULE_HEADER_EX, NULL,
438+
mysqli_deps,
439+
#elif ZEND_MODULE_API_NO >= 20010901
440+
STANDARD_MODULE_HEADER,
441+
#endif
429442
STANDARD_MODULE_HEADER,
430443
"mysqli",
431444
mysqli_functions,

0 commit comments

Comments
 (0)