Merge pull request #44 from djfm/feat/starter-theme
// cleaner way to suppress the notice
This commit is contained in:
+6
-1
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user