From f02109bdc955f0440efc6490e4a6e0437603a04f Mon Sep 17 00:00:00 2001 From: netkas Date: Wed, 12 Mar 2025 17:49:45 -0400 Subject: [PATCH] Refactor SettingsInformationFieldExists to ensure field parameter is cast to string for proper handling https://github.com/nosial/Socialbox-PHP/issues/64 --- .../Settings/SettingsInformationFieldExists.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Socialbox/Classes/StandardMethods/Settings/SettingsInformationFieldExists.php b/src/Socialbox/Classes/StandardMethods/Settings/SettingsInformationFieldExists.php index 3823e81..21eb9e7 100644 --- a/src/Socialbox/Classes/StandardMethods/Settings/SettingsInformationFieldExists.php +++ b/src/Socialbox/Classes/StandardMethods/Settings/SettingsInformationFieldExists.php @@ -27,7 +27,8 @@ { throw new MissingRpcArgumentException('field'); } - $fieldName = InformationFieldName::tryFrom(strtoupper($rpcRequest->getParameter('field'))); + + $fieldName = InformationFieldName::tryFrom(strtoupper((string)$rpcRequest->getParameter('field'))); if($fieldName === null) { throw new InvalidRpcArgumentException('field');