From 57fa3548428900d03f58a310d0f2dc717a7a5bb6 Mon Sep 17 00:00:00 2001 From: Shish Date: Fri, 17 Jun 2016 22:51:30 +0100 Subject: [PATCH] fnmatch has a string length limit :| --- ext/blocks/main.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/blocks/main.php b/ext/blocks/main.php index 314155f0..43043370 100644 --- a/ext/blocks/main.php +++ b/ext/blocks/main.php @@ -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'])); } }