fnmatch has a string length limit :|

This commit is contained in:
Shish 2016-06-17 22:51:30 +01:00
parent 190d8bd7d7
commit 57fa354842

View file

@ -40,7 +40,8 @@ class Blocks extends Extension {
$database->cache->set("blocks", $blocks, 600);
}
foreach($blocks as $block) {
if(fnmatch($block['pages'], implode("/", $event->args))) {
$path = implode("/", $event->args);
if(strlen($path) < 4000 && fnmatch($block['pages'], $path)) {
$page->add_block(new Block($block['title'], $block['content'], $block['area'], $block['priority']));
}
}