Created
October 12, 2023 14:03
-
-
Save bka/19fd06189ec376f2971cf23016296414 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git Plugin/Webapi/Controller/Rest/ValidateCustomerData.php Plugin/Webapi/Controller/Rest/ValidateCustomerData.php | |
index ad2d8ed..63551ff 100644 | |
--- Plugin/Webapi/Controller/Rest/ValidateCustomerData.php | |
+++ Plugin/Webapi/Controller/Rest/ValidateCustomerData.php | |
@@ -28,8 +28,8 @@ class ValidateCustomerData | |
*/ | |
public function beforeOverride(ParamsOverrider $subject, array $inputData, array $parameters): array | |
{ | |
- if (isset($inputData[self:: CUSTOMER_KEY])) { | |
- $inputData[self:: CUSTOMER_KEY] = $this->validateInputData($inputData[self:: CUSTOMER_KEY]); | |
+ if (isset($inputData[self::CUSTOMER_KEY])) { | |
+ $inputData[self::CUSTOMER_KEY] = $this->validateInputData($inputData[self::CUSTOMER_KEY]); | |
} | |
return [$inputData, $parameters]; | |
} | |
@@ -45,7 +45,7 @@ class ValidateCustomerData | |
$result = []; | |
$data = array_filter($inputData, function ($k) use (&$result) { | |
- $key = is_string($k) ? strtolower($k) : $k; | |
+ $key = is_string($k) ? strtolower(str_replace('_', "", $k)) : $k; | |
return !isset($result[$key]) && ($result[$key] = true); | |
}, ARRAY_FILTER_USE_KEY); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment