You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have had a visitor that put its name like "Lastname, Firstname". Because of the comma splitting in Settings.php it makes two names out of it (with one email). It gives me this error:
ValueError: array_fill(): Argument #2 ($count) must be greater than or equal to 0
File "/app/vendor/miranj/craft-contact-form-tuner/src/models/Settings.php", line 117, in array_fill
$names = array_merge($names, array_fill(0, count($emails) - count($names), ''));
File "/app/vendor/miranj/craft-contact-form-tuner/src/models/Settings.php", line 117, in miranj\contactformtuner\models\Settings::prepEmailConfig
$names = array_merge($names, array_fill(0, count($emails) - count($names), ''));
File "/app/vendor/miranj/craft-contact-form-tuner/src/models/Settings.php", line 54, in miranj\contactformtuner\models\Settings::getCcConfig
$emails = $this->prepEmailConfig($this->ccEmail, $this->ccName);
It should handle this more properly
The text was updated successfully, but these errors were encountered:
Sounds like the ccEmail and ccName values are based on user submitted data in your project. If you want to avoid triggering the plugin’s comma splitting logic, you can set both these values to be arrays instead of strings. When the value is already an array, the plugin will use that instead of attempting to disambiguate it. So if you are sure to only support a single CC recipient, something like this might do the trick:
I have had a visitor that put its name like "Lastname, Firstname". Because of the comma splitting in Settings.php it makes two names out of it (with one email). It gives me this error:
It should handle this more properly
The text was updated successfully, but these errors were encountered: