1
0
mirror of https://github.com/maximebf/php-debugbar.git synced 2025-01-17 21:38:14 +01:00

added try/catch block to catch unused session is hasStackedData()

This commit is contained in:
maximebf 2013-10-24 17:12:56 -04:00
parent 938e56b2c7
commit 1dc21f08ef

View File

@ -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;
} }