]> granicus.if.org Git - php/commitdiff
fix segfault in session/tests/031.phpt by adding optional extension
authorAntony Dovgal <tony2001@php.net>
Tue, 28 Jul 2009 08:54:23 +0000 (08:54 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 28 Jul 2009 08:54:23 +0000 (08:54 +0000)
dependency (php_hash_hashtable has to be initialized when setting
session.hash_function)

ext/session/config.m4
ext/session/session.c

index 93df332b40662fbdf024c902ce773e425adae450..bc8001f85a46079feb7e915bb06228b60cdb2288 100644 (file)
@@ -12,6 +12,7 @@ if test "$PHP_SESSION" != "no"; then
   PHP_PWRITE_TEST
   PHP_PREAD_TEST
   PHP_NEW_EXTENSION(session, session.c mod_files.c mod_mm.c mod_user.c, $ext_shared)
+  PHP_ADD_EXTENSION_DEP(session, hash)
   PHP_SUBST(SESSION_SHARED_LIBADD)
   PHP_INSTALL_HEADERS(ext/session, [php_session.h mod_files.h mod_user.h])
   AC_DEFINE(HAVE_PHP_SESSION,1,[ ])
index 69eedfdcee2aa2581d439346c6aef8cf1797c99e..8665bbf60287442dc68e1f7f30bc2a13713ef4ff 100644 (file)
@@ -2107,8 +2107,16 @@ static PHP_MINFO_FUNCTION(session) /* {{{ */
 }
 /* }}} */
 
+static const zend_module_dep session_deps[] = { /* {{{ */
+       ZEND_MOD_OPTIONAL("hash")
+       {NULL, NULL, NULL}
+};
+/* }}} */
+
 zend_module_entry session_module_entry = {
-       STANDARD_MODULE_HEADER,
+       STANDARD_MODULE_HEADER_EX,
+       NULL,
+       session_deps,
        "session",
        session_functions,
        PHP_MINIT(session), PHP_MSHUTDOWN(session),