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.
This commit is contained in:
Bram de Leeuw 2021-08-05 12:10:06 +02:00 committed by GitHub
parent 715208539e
commit ecb233012d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -167,7 +167,7 @@ class SSViewer implements Flushable
*
* @var array
*/
protected $subTemplates = null;
protected $subTemplates = [];
/**
* @var bool