From 582352b2d25752d607c90e97e2cc72277c6453ed Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Tue, 8 Sep 2020 23:15:36 +0300 Subject: [PATCH] Fixed infinite loop in blueprints with `extend@` to a parent stream --- CHANGELOG.md | 1 + system/src/Grav/Common/Data/Blueprint.php | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 65a646fa9..c3317ff64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ 1. [](#bugfix) * Fixed `Security::sanitizeSVG()` creating an empty file if SVG file cannot be parsed + * Fixed infinite loop in blueprints with `extend@` to a parent stream # v1.7.0-rc.16 ## 09/01/2020 diff --git a/system/src/Grav/Common/Data/Blueprint.php b/system/src/Grav/Common/Data/Blueprint.php index 333db7289..3504de276 100644 --- a/system/src/Grav/Common/Data/Blueprint.php +++ b/system/src/Grav/Common/Data/Blueprint.php @@ -349,7 +349,11 @@ class Blueprint extends BlueprintForm if (\is_string($path) && !$locator->isStream($path)) { // Find path overrides. - $paths = (array) ($this->overrides[$path] ?? null); + if (null === $context) { + $paths = (array) ($this->overrides[$path] ?? null); + } else { + $paths = []; + } // Add path pointing to default context. if ($context === null) {