// cleaner way to suppress the notice

This commit is contained in:
djfm
2015-09-25 16:52:30 +02:00
parent f768562000
commit c1d2b09918
+6 -1
View File
@@ -958,7 +958,12 @@ class Blocktopmenu extends Module implements WidgetInterface
protected function clearMenuCache()
{
$dir = $this->getCacheDirectory();
foreach (@scandir($dir) as $entry) {
if (!is_dir($dir)) {
return;
}
foreach (scandir($dir) as $entry) {
if (preg_match('/\.json$/', $entry)) {
unlink($dir . DIRECTORY_SEPARATOR . $entry);
}