From bd4f538caf58a28b5327b1a948acc62d4428d917 Mon Sep 17 00:00:00 2001 From: Yasuo Ohgaki Date: Thu, 10 Jan 2002 07:37:38 +0000 Subject: [PATCH] Clarify user session save handlers return values git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@67507 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/session.xml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/functions/session.xml b/functions/session.xml index f3f5eb95c6..4bb9a0a5c9 100644 --- a/functions/session.xml +++ b/functions/session.xml @@ -1,5 +1,5 @@ - + Session handling functions Sessions @@ -1010,6 +1010,12 @@ $_SESSION["spongebob"] = "He's got square pants."; extended to cover database storage using your favorite PHP supported database engine. + + Read function must return string value always to make save + handler work as expected. Return empty string if there is no data + to read. Return values from other handlers are converted to + boolean expression. TRUE for success, FALSE for failure. + @@ -1038,7 +1044,7 @@ function read ($id) { $sess_data = fread($fp, filesize($sess_file)); return($sess_data); } else { - return(""); // Must return ("") here. + return(""); // Must return "" here. } }