Skip to content

Commit 0b86e91

Browse files
authored
fix security check
1 parent ba9a09e commit 0b86e91

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/MonitoringBundle/Service/WatchDog.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ class WatchDog
3131
protected $kernel;
3232

3333
/**
34-
* WatchDog constructor.
35-
*
3634
* @param PimcoreBundleManager $pimcoreBundleManager
3735
* @param AreabrickManager $areabrickManager
3836
* @param Kernel $kernel
@@ -106,13 +104,18 @@ public function getExtensionsInfo()
106104
public function getSecurityCheck()
107105
{
108106
$checker = new SecurityChecker();
109-
$data = [];
107+
110108
try {
111109
$data = $checker->check($this->kernel->getProjectDir());
112110
} catch (\Exception $e) {
113111
// fail silently
112+
return [];
113+
}
114+
115+
if ($data->count() > 0) {
116+
return json_decode((string) $data, true);
114117
}
115118

116-
return $data;
119+
return [];
117120
}
118-
}
121+
}

0 commit comments

Comments
 (0)