From 2631133abeba6513cba6b776ec0d09869d317375 Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Tue, 8 Jul 2025 10:58:03 -0700 Subject: [PATCH] fix(CustomAttribute): handle invalid data If a CustomAttribute has a '=' sign in the value handle that situation. Also if a CustomAttribute was added without a value, which can happen by an API call, then ignore the attribute. --- Domain/Values/CustomAttributes.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Domain/Values/CustomAttributes.php b/Domain/Values/CustomAttributes.php index acd60d806..dde9c4707 100644 --- a/Domain/Values/CustomAttributes.php +++ b/Domain/Values/CustomAttributes.php @@ -19,8 +19,12 @@ public static function Parse($attributes) $pairs = explode('!sep!', $attributes); foreach ($pairs as $pair) { - $nv = explode('=', $pair); - $ca->Add($nv[0], $nv[1]); + $nv = explode('=', $pair, 2); + if (count($nv) !== 2) { + Log::Debug('nv not exploded to two values: %s', print_r($nv, true)); + } else { + $ca->Add($nv[0], $nv[1]); + } } return $ca;