Fixing fatal error

1.10.x
Julio Montoya 12 years ago
parent a1b90dd1cf
commit 7d77eebc38
  1. 7
      main/inc/lib/chamilo_session.class.php

@ -140,8 +140,11 @@ class ChamiloSession
*/
public static function read($variable, $default = null)
{
$result = self::$session->get($variable);
// check if the value exists in the $_SESSION array
$result = null;
if (isset(self::$session)) {
$result = self::$session->get($variable);
}
// Check if the value exists in the $_SESSION array
if (empty($result)) {
return isset($_SESSION[$variable]) ? $_SESSION[$variable] : $default;
} else {

Loading…
Cancel
Save