I tried this addon added openAI API key but the form wont submit. I also tried on a 2nd site and it has the same error even with default form data.
admin.php?add-ons/Eggy-AIImageGallery/options
admin.php?add-ons/Eggy-AIImageGallery/options
PHP:
LogicException: Only arrays can be set to array type options in src/XF/Entity/Option.php at line 351
XF\Entity\Option->castOptionValue() in src/XF/Entity/Option.php at line 231
XF\Entity\Option->verifyOptionValue() in src/XF/Mvc/Entity/Entity.php at line 842
XF\Mvc\Entity\Entity->_verifyValueCustom() in src/XF/Mvc/Entity/Entity.php at line 683
XF\Mvc\Entity\Entity->set() in src/XF/Mvc/Entity/Entity.php at line 618
XF\Mvc\Entity\Entity->__set() in src/XF/Repository/OptionRepository.php at line 120
XF\Repository\OptionRepository->updateOptions() in src/XF/Admin/Controller/OptionController.php at line 91
XF\Admin\Controller\OptionController->actionUpdate() in src/XF/Mvc/Dispatcher.php at line 364
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 266
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 121
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 63
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2840
XF\App->run() in src/XF.php at line 850
XF::runApp() in admin.php at line 15
PHP:
Request state
array(4) {
["url"] => string(25) "/admin.php?options/update"
["referrer"] => string(64) "ht tps://xxxxxxxxxx/admin.php?add-ons/Eggy-AIImageGallery/options"
["_GET"] => array(1) {
["options/update"] => string(0) ""
}
["_POST"] => array(6) {
["_xfToken"] => string(8) "********"
["options"] => array(55) {
["eggyAiGalleryEnabled"] => string(1) "1"
["eggyAiGalleryAllowedSizes"] => string(29) "1024x1024,1536x1024,1024x1536"
["eggyAiGalleryMaxDimension"] => string(4) "2048"
["eggyAiGalleryMaxImagesPerRequest"] => string(1) "1"
["eggyAiGalleryGenerationCost"] => string(1) "1"
["eggyAiGalleryDailyFree"] => string(1) "0"
["eggyAiGalleryGenerationCooldown"] => string(2) "10"
["eggyAiGalleryStartingTokens"] => string(1) "0"
["eggyAiGalleryRequireApproval"] => string(1) "1"
["eggyAiGalleryMaxPromptLength"] => string(4) "4000"
["eggyAiGalleryDefaultProvider"] => string(6) "openai"
["eggyAiGalleryMaxSteps"] => string(2) "50"
["eggyAiGalleryTimeout"] => string(3) "120"
["eggyAiGalleryOpenAiEnabled"] => string(1) "1"
["eggyAiGalleryOpenAiApiKey"] => string(0) ""
["eggyAiGalleryOpenAiModels"] => string(11) "gpt-image-2"
["eggyAiGalleryOpenAiCost"] => string(1) "1"
["eggyAiGalleryCloudflareAccountId"] => string(0) ""
["eggyAiGalleryCloudflareApiToken"] => string(0) ""
["eggyAiGalleryCloudflareModels"] => string(36) "@cf/black-forest-labs/flux-1-schnell"
["eggyAiGalleryCloudflareCost"] => string(1) "1"
["eggyAiGalleryA1111Endpoint"] => string(21) "http://127.0.0.1:7860"
["eggyAiGalleryA1111Username"] => string(0) ""
["eggyAiGalleryA1111Password"] => string(0) ""
["eggyAiGalleryA1111Models"] => string(0) ""
["eggyAiGalleryA1111Cost"] => string(1) "1"
["eggyAiGalleryComfyEndpoint"] => string(21) "http://127.0.0.1:8188"
["eggyAiGalleryComfyModels"] => string(0) ""
["eggyAiGalleryComfyWorkflowJson"] => string(0) ""
["eggyAiGalleryComfyPromptTarget"] => string(0) ""
["eggyAiGalleryComfyNegativeTarget"] => string(0) ""
["eggyAiGalleryComfyWidthTarget"] => string(0) ""
["eggyAiGalleryComfyHeightTarget"] => string(0) ""
["eggyAiGalleryComfyStepsTarget"] => string(0) ""
["eggyAiGalleryComfyCfgTarget"] => string(0) ""
["eggyAiGalleryComfySamplerTarget"] => string(0) ""
["eggyAiGalleryComfySchedulerTarget"] => string(0) ""
["eggyAiGalleryComfySeedTarget"] => string(0) ""
["eggyAiGalleryComfyModelTarget"] => string(0) ""
["eggyAiGalleryComfyCost"] => string(1) "1"
["eggyAiGalleryCompatibleEndpoint"] => string(41) "https://example.com/v1/images/generations"
["eggyAiGalleryCompatibleApiKey"] => string(0) ""
["eggyAiGalleryCompatibleModels"] => string(0) ""
["eggyAiGalleryCompatibleExtraJson"] => string(0) ""
["eggyAiGalleryCompatibleCost"] => string(1) "1"
["eggyAiGalleryCustomEndpoint"] => string(28) "https://example.com/generate"
["eggyAiGalleryCustomModels"] => string(0) ""
["eggyAiGalleryCustomAuthHeader"] => string(13) "Authorization"
["eggyAiGalleryCustomAuthValue"] => string(19) "Bearer YOUR_API_KEY"
["eggyAiGalleryCustomRequestTemplate"] => string(43) "{"prompt":"{{prompt}}","model":"{{model}}"}"
["eggyAiGalleryCustomResponsePath"] => string(15) "data.0.b64_json"
["eggyAiGalleryCustomResponseType"] => string(6) "base64"
["eggyAiGalleryCustomCost"] => string(1) "1"
["eggyAiGalleryPackages"] => string(62) "Starter|10|2.99|USD
Creator|50|9.99|USD
Studio|120|19.99|USD"
["eggyAiGalleryPaymentProfiles"] => string(0) ""
}
["options_listed"] => array(61) {
[0] => string(20) "eggyAiGalleryEnabled"
[1] => string(25) "eggyAiGalleryAllowedSizes"
[2] => string(25) "eggyAiGalleryMaxDimension"
[3] => string(32) "eggyAiGalleryMaxImagesPerRequest"
[4] => string(27) "eggyAiGalleryGenerationCost"
[5] => string(22) "eggyAiGalleryDailyFree"
[6] => string(31) "eggyAiGalleryGenerationCooldown"
[7] => string(27) "eggyAiGalleryStartingTokens"
[8] => string(28) "eggyAiGalleryRequireApproval"
[9] => string(26) "eggyAiGalleryDefaultPublic"
[10] => string(28) "eggyAiGalleryMaxPromptLength"
[11] => string(28) "eggyAiGalleryDefaultProvider"
[12] => string(21) "eggyAiGalleryMaxSteps"
[13] => string(20) "eggyAiGalleryTimeout"
[14] => string(26) "eggyAiGalleryOpenAiEnabled"
[15] => string(25) "eggyAiGalleryOpenAiApiKey"
[16] => string(25) "eggyAiGalleryOpenAiModels"
[17] => string(23) "eggyAiGalleryOpenAiCost"
[18] => string(30) "eggyAiGalleryCloudflareEnabled"
[19] => string(32) "eggyAiGalleryCloudflareAccountId"
[20] => string(31) "eggyAiGalleryCloudflareApiToken"
[21] => string(29) "eggyAiGalleryCloudflareModels"
[22] => string(27) "eggyAiGalleryCloudflareCost"
[23] => string(25) "eggyAiGalleryA1111Enabled"
[24] => string(26) "eggyAiGalleryA1111Endpoint"
[25] => string(26) "eggyAiGalleryA1111Username"
[26] => string(26) "eggyAiGalleryA1111Password"
[27] => string(24) "eggyAiGalleryA1111Models"
[28] => string(22) "eggyAiGalleryA1111Cost"
[29] => string(25) "eggyAiGalleryComfyEnabled"
[30] => string(26) "eggyAiGalleryComfyEndpoint"
[31] => string(24) "eggyAiGalleryComfyModels"
[32] => string(30) "eggyAiGalleryComfyWorkflowJson"
[33] => string(30) "eggyAiGalleryComfyPromptTarget"
[34] => string(32) "eggyAiGalleryComfyNegativeTarget"
[35] => string(29) "eggyAiGalleryComfyWidthTarget"
[36] => string(30) "eggyAiGalleryComfyHeightTarget"
[37] => string(29) "eggyAiGalleryComfyStepsTarget"
[38] => string(27) "eggyAiGalleryComfyCfgTarget"
[39] => string(31) "eggyAiGalleryComfySamplerTarget"
[40] => string(33) "eggyAiGalleryComfySchedulerTarget"
[41] => string(28) "eggyAiGalleryComfySeedTarget"
[42] => string(29) "eggyAiGalleryComfyModelTarget"
[43] => string(22) "eggyAiGalleryComfyCost"
[44] => string(30) "eggyAiGalleryCompatibleEnabled"
[45] => string(31) "eggyAiGalleryCompatibleEndpoint"
[46] => string(29) "eggyAiGalleryCompatibleApiKey"
[47] => string(29) "eggyAiGalleryCompatibleModels"
[48] => string(32) "eggyAiGalleryCompatibleExtraJson"
[49] => string(27) "eggyAiGalleryCompatibleCost"
[50] => string(26) "eggyAiGalleryCustomEnabled"
[51] => string(27) "eggyAiGalleryCustomEndpoint"
[52] => string(25) "eggyAiGalleryCustomModels"
[53] => string(29) "eggyAiGalleryCustomAuthHeader"
[54] => string(28) "eggyAiGalleryCustomAuthValue"
[55] => string(34) "eggyAiGalleryCustomRequestTemplate"
[56] => string(31) "eggyAiGalleryCustomResponsePath"
[57] => string(31) "eggyAiGalleryCustomResponseType"
[58] => string(23) "eggyAiGalleryCustomCost"
[59] => string(21) "eggyAiGalleryPackages"
[60] => string(28) "eggyAiGalleryPaymentProfiles"
}
["_xfResponseType"] => string(4) "json"
["_xfWithData"] => string(1) "1"
["_xfRequestUri"] => string(46) "/admin.php?add-ons/Eggy-AIImageGallery/options"
}