在 Laravel PHP 中使用文件系统启用会话时出现此错误。
Only variables should be passed by reference in SYS_PATH/session.php on line 230.
Stack Trace:
0 /Applications/XAMPP/xamppfiles/htdocs/laravel/system/session.php(230): System\{closure}(2048, 'Only variables ...', '/Applications/X...', 230, Array)
1 /Applications/XAMPP/xamppfiles/htdocs/laravel/system/session.php(190): System\Session::write_cookie()
2 /Applications/XAMPP/xamppfiles/htdocs/laravel/system/laravel.php(187): System\Session::close()
3 /Applications/XAMPP/xamppfiles/htdocs/laravel/public/index.php(44): require('/Applications/X...')
4 {main}
Snapshot:
225: */
226: private static function write_cookie()
227: {
228: if ( ! headers_sent())
229: {
230: extract(Config::get('session'));
231:
232: $minutes = ($expire_on_close) ? 0 : $lifetime;
233:
234: Cookie::put('laravel_session', static::$session['id'], $minutes, $path, $domain, $https, $http_only);
235: }
有人遇到过这个问题吗?即使你不使用 Laravel,有什么见解吗?