Code: Select all
2021-01-09 3:11:28 - PHP Warning: fread(): Length parameter must be greater than 0 in /home/xxx/public_html/system/library/session/file.php on line 14
Code: Select all
public function read($session_id) {
$file = DIR_SESSION . '/sess_' . basename($session_id);
if (is_file($file)) {
$handle = fopen($file, 'r');
flock($handle, LOCK_SH);
$data = fread($handle, filesize($file));
flock($handle, LOCK_UN);
fclose($handle);
return unserialize($data);
} else {
return array();
}
}
Code: Select all
$data = fread($handle, filesize($file));