mirror of
https://github.com/appwrite/appwrite
synced 2026-05-22 00:18:25 +00:00
Fix notice
This commit is contained in:
parent
fd02ca00f0
commit
d4fb0d37c2
1 changed files with 3 additions and 2 deletions
|
|
@ -44,9 +44,10 @@ class GetTemplate extends Base
|
|||
{
|
||||
$templates = Config::getParam('site-templates', []);
|
||||
|
||||
$template = array_shift(\array_filter($templates, function ($item) use ($templateId) {
|
||||
$allowedTemplates = \array_filter($templates, function ($item) use ($templateId) {
|
||||
return $item['id'] === $templateId;
|
||||
}));
|
||||
});
|
||||
$template = array_shift($allowedTemplates);
|
||||
|
||||
if (empty($template)) {
|
||||
throw new Exception(Exception::SITE_TEMPLATE_NOT_FOUND);
|
||||
|
|
|
|||
Loading…
Reference in a new issue