From ecb233012d0569f0ea4982ec343c64992397352c Mon Sep 17 00:00:00 2001 From: Bram de Leeuw Date: Thu, 5 Aug 2021 12:10:06 +0200 Subject: [PATCH] Fix error when executing method SSViewer::templates() when $subTemplates is still null Without the fix this causes the framework to throw a 500 error: `ERROR [Warning]: array_merge(): Expected parameter 2 to be an array, null given` I noticed the error while doing a search with the `GridFieldAddExistingAutocompleter`. The error probably gets supressed on live environments. --- src/View/SSViewer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/View/SSViewer.php b/src/View/SSViewer.php index b05f5439d..b7397f30c 100644 --- a/src/View/SSViewer.php +++ b/src/View/SSViewer.php @@ -167,7 +167,7 @@ class SSViewer implements Flushable * * @var array */ - protected $subTemplates = null; + protected $subTemplates = []; /** * @var bool