iliaa           Sun Sep 29 11:55:12 2002 EDT

  Modified files:              
    /php4/ext/session   session.c 
  Log:
  Fixed bug #17281
  
  
Index: php4/ext/session/session.c
diff -u php4/ext/session/session.c:1.319 php4/ext/session/session.c:1.320
--- php4/ext/session/session.c:1.319    Sun Sep 29 11:26:50 2002
+++ php4/ext/session/session.c  Sun Sep 29 11:55:11 2002
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: session.c,v 1.319 2002/09/29 15:26:50 iliaa Exp $ */
+/* $Id: session.c,v 1.320 2002/09/29 15:55:11 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -463,6 +463,11 @@
 {
        char *ret = NULL;
 
+       if (!PS(http_session_vars)) {
+                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot encode 
+non-existent session.");
+                return NULL;
+       }
+
        if (PS(serializer)->encode(&ret, newlen TSRMLS_CC) == FAILURE)
                ret = NULL;
 
@@ -1318,6 +1323,10 @@
        }
 
        enc = php_session_encode(&len TSRMLS_CC);
+       if (enc == NULL) {
+               RETURN_FALSE;
+       }
+       
        RETVAL_STRINGL(enc, len, 0);
 }
 /* }}} */



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to