Skip to content

Commit 5790059

Browse files
committed
bug #606 [AI Bundle] Fix validation on system prompt translation validation of bundle options (chr-hertel)
This PR was merged into the main branch. Discussion ---------- [AI Bundle] Fix validation on system prompt translation validation of bundle options | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | Docs? | no | Issues | | License | MIT Follow up #514 <img width="1260" height="632" alt="image" src="https://github.com/user-attachments/assets/16ae5600-a35f-45db-a39f-39a5adc5ab64" /> Commits ------- 5be7070 Fix validation on system prompt translation validation of bundle options
2 parents 8892cee + 5be7070 commit 5790059

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ai-bundle/config/options.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@
235235
->end()
236236
->validate()
237237
->ifTrue(function ($v) {
238-
return \is_array($v) && $v['enabled'] && !interface_exists(TranslatorInterface::class);
238+
return \is_array($v) && ($v['enabled'] ?? false) && !interface_exists(TranslatorInterface::class);
239239
})
240240
->thenInvalid('System prompt translation is enabled, but no translator is present. Try running `composer require symfony/translation`.')
241241
->end()

0 commit comments

Comments
 (0)