ImportSourceRestApi: Fix strlen deprecation (#2891)

fix #2889
This commit is contained in:
Eric Lippmann 2024-10-23 13:17:45 +02:00 committed by GitHub
commit 0287012739
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -273,11 +273,9 @@ class ImportSourceRestApi extends ImportSourceHook
),
]);
$passRequired = strlen($form->getSentOrObjectSetting('proxy_user')) > 0;
$form->addElement('storedPassword', 'proxy_pass', [
'label' => $form->translate('Proxy Password'),
'required' => $passRequired
'required' => strlen((string) $form->getSentOrObjectSetting('proxy_user')) > 0
]);
}
}