phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] phpgwapi/inc/class.sessions_php4.inc.php, 1.6.2.10.2.


From: nomail
Subject: [Phpgroupware-cvs] phpgwapi/inc/class.sessions_php4.inc.php, 1.6.2.10.2.15
Date: Wed, 30 Jun 2004 06:12:47 +0200

Update of /phpgwapi/inc
Modified Files:
        Branch: Version-0_9_16-branch
          class.sessions_php4.inc.php

date: 2004/06/30 04:12:47;  author: skwashd;  state: Exp;  lines: +10 -4

Log Message:
bug #9349
=====================================================================
Index: phpgwapi/inc/class.sessions_php4.inc.php
diff -u phpgwapi/inc/class.sessions_php4.inc.php:1.6.2.10.2.14 
phpgwapi/inc/class.sessions_php4.inc.php:1.6.2.10.2.15
--- phpgwapi/inc/class.sessions_php4.inc.php:1.6.2.10.2.14      Tue Mar 23 
19:55:35 2004
+++ phpgwapi/inc/class.sessions_php4.inc.php    Wed Jun 30 04:12:47 2004
@@ -212,9 +212,15 @@
                                }
                                if (!isset($session_cache[$file]))      // not 
in cache, read and cache it
                                {
-                                       $fd = fopen ($path . '/' . $file,'r');
-                                       $session = fread ($fd, filesize ($path 
. '/' . $file));
-                                       fclose ($fd);
+          $fd = fopen ($path . '/' . $file,'r');
+          $fs = filesize ($path . '/' . $file);
+          // handle filesize 0 because php recently warns if fread is used on 
0byte files 
+          if ($fs > 0) {
+            $session = fread ($fd, filesize ($path . '/' . $file));
+          } else {
+            $session = '';
+          }
+          fclose ($fd);
                                        if (substr($session,0,14) != 
'phpgw_session|')
                                        {
                                                continue;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]