mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-07-04 08:33:39 +02:00
added try/catch block to catch unused session is hasStackedData()
This commit is contained in:
@ -316,7 +316,11 @@ class DebugBar implements ArrayAccess
|
|||||||
*/
|
*/
|
||||||
public function hasStackedData()
|
public function hasStackedData()
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
$http = $this->initStackSession();
|
$http = $this->initStackSession();
|
||||||
|
} catch (DebugBarException $e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return count($http->getSessionValue($this->stackSessionNamespace)) > 0;
|
return count($http->getSessionValue($this->stackSessionNamespace)) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user