From d946b0d31698f19f5ad82e48b15cca8c03188549 Mon Sep 17 00:00:00 2001 From: raviks789 Date: Wed, 17 Jul 2024 09:42:25 +0200 Subject: [PATCH] ImportSourceRestApi: Fix strlen deprecation --- library/Director/Import/ImportSourceRestApi.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/library/Director/Import/ImportSourceRestApi.php b/library/Director/Import/ImportSourceRestApi.php index 45f7351a0..8a8449c42 100644 --- a/library/Director/Import/ImportSourceRestApi.php +++ b/library/Director/Import/ImportSourceRestApi.php @@ -273,11 +273,9 @@ protected static function addProxy(QuickForm $form) ), ]); - $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 ]); } }