Avoid passing `null` to `strlen` in SyncJob::addSettingsFormFields()

This commit is contained in:
raviks789 2022-06-07 15:28:06 +02:00 committed by Thomas Gelf
parent 4692b28dbd
commit 9e8142b79a
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,7 @@ class SyncJob extends JobHook
)
));
if (! strlen($form->getSentOrObjectValue('job_name'))) {
if ((string) $form->getSentOrObjectValue('job_name') !== '') {
if (($ruleId = $form->getSentValue('rule_id')) && array_key_exists($ruleId, $rules)) {
$name = sprintf('Sync job: %s', $rules[$ruleId]);
$form->getElement('job_name')->setValue($name);