Skip to content

Commit 93c8184

Browse files
committed
Fix extended options
1 parent 238801b commit 93c8184

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "medienbaecker/kirby-modules",
33
"description": "Easily add modules to your pages",
4-
"version": "2.8.1",
4+
"version": "2.8.2",
55
"license": "MIT",
66
"authors": [
77
{

lib/functions.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,14 @@ function createModuleRegistry() {
6464
return Str::replace($blueprintName, 'pages/', '');
6565
}, $blueprintNames);
6666

67-
foreach($registry['blueprints'] as $key => $blueprint) {
67+
foreach($registry['blueprints'] as &$blueprint) {
6868
if(
69-
!array_key_exists('options', $registry['blueprints'][$key]) ||
70-
!array_key_exists('changeTemplate', $registry['blueprints'][$key]['options'])
69+
!isset($blueprint['options']) ||
70+
(
71+
is_array($blueprint['options']) && !isset($blueprint['options']['changeTemplate']
72+
))
7173
) {
72-
$registry['blueprints'][$key]['options']['changeTemplate'] = $blueprintNames;
74+
$blueprint['options']['changeTemplate'] = $blueprintNames;
7375
}
7476
}
7577

0 commit comments

Comments
 (0)