iliaa Sun Sep 29 14:33:14 2002 EDT
Modified files:
/php4/ext/session session.c
Log:
Fixed a crash, which would occur when save_handler is invalid.
Index: php4/ext/session/session.c
diff -u php4/ext/session/session.c:1.320 php4/ext/session/session.c:1.321
--- php4/ext/session/session.c:1.320 Sun Sep 29 11:55:11 2002
+++ php4/ext/session/session.c Sun Sep 29 14:33:14 2002
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: session.c,v 1.320 2002/09/29 15:55:11 iliaa Exp $ */
+/* $Id: session.c,v 1.321 2002/09/29 18:33:14 iliaa Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -537,6 +537,11 @@
{
char *val;
int vallen;
+
+ if (!PS(mod)) {
+ php_error_docref(NULL TSRMLS_CC, E_ERROR, "Failed to initialize
+session module.");
+ return;
+ }
/* Open session handler first */
if (PS(mod)->open(&PS(mod_data), PS(save_path), PS(session_name) TSRMLS_CC) ==
FAILURE) {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php