Replace all session_start() calls with sqsession_is_active(). The latter
[squirrelmail.git] / include / options / personal.php
index fb532f92affee07584c9fb51bf9d961ed2a45b13..26b3793d033477e6754c3eec562a29d9b3b76a8f 100644 (file)
@@ -121,11 +121,13 @@ function load_optpage_data_personal() {
     if ( $tzChangeAllowed ) {
         $TZ_ARRAY[SMPREF_NONE] = _("Same as server");
         $tzfile = SM_PATH . 'locale/timezones.cfg';
-        if(!$fd = fopen($tzfile ,'r')) {
-            $message = _("Error opening timezone config, contact administrator.");
-            plain_error_message($message, $color);
-            exit;
-        }
+               if ((!is_readable($tzfile)) or (!$fd = fopen($tzfile,'r'))) {
+               $message = _("Error opening timezone config, contact administrator.");
+               }
+               if (isset($message)) {
+                   plain_error_message($message, $color);
+                   exit;
+       }
         while (!feof ($fd)) {
             $zone = fgets($fd, 1024);
             if( $zone ) {