From 0ce322ad94108c06c3b2dd07d320662865c10c8f Mon Sep 17 00:00:00 2001 From: Alexis Gousseau Date: Thu, 7 Aug 2025 10:32:58 +0200 Subject: [PATCH 1/2] fix: :bug: force string cast in ctype_digit method --- src/Models/ArcadiaMailDefault.php | 2 +- src/Models/ArcadiaMailGame.php | 2 +- src/Models/Question.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Models/ArcadiaMailDefault.php b/src/Models/ArcadiaMailDefault.php index eec8210..c9ca75f 100644 --- a/src/Models/ArcadiaMailDefault.php +++ b/src/Models/ArcadiaMailDefault.php @@ -327,7 +327,7 @@ class ArcadiaMailDefault extends ClientModel try { $properties['state_order'] = (\is_object($properties['state_order']) and get_class($properties['state_order']) === ArcadiaOrderType::class) ? - $properties['state_order']->value() : (ctype_digit($properties['state_order']) ? + $properties['state_order']->value() : (ctype_digit((string)$properties['state_order']) ? (int)$properties['state_order'] : $properties['state_order']); } catch (\TypeError | \BadMethodCallException) { // * Cast anyway diff --git a/src/Models/ArcadiaMailGame.php b/src/Models/ArcadiaMailGame.php index 2b9e482..aa180e0 100644 --- a/src/Models/ArcadiaMailGame.php +++ b/src/Models/ArcadiaMailGame.php @@ -296,7 +296,7 @@ class ArcadiaMailGame extends ClientModel try { $properties['state_order'] = (\is_object($properties['state_order']) and get_class($properties['state_order']) === ArcadiaOrderType::class) ? - $properties['state_order']->value : (ctype_digit($properties['state_order']) ? + $properties['state_order']->value : (ctype_digit((string)$properties['state_order']) ? (int)$properties['state_order'] : $properties['state_order']); } catch (\TypeError | \BadMethodCallException) { // * Cast anyway diff --git a/src/Models/Question.php b/src/Models/Question.php index 51098df..00902a4 100644 --- a/src/Models/Question.php +++ b/src/Models/Question.php @@ -154,7 +154,7 @@ class Question extends ClientModel try { $properties['type'] = (\is_object($properties['type']) and get_class($properties['type']) === QuestionType::class) ? - $properties['type']->value : (ctype_digit($properties['type']) ? + $properties['type']->value : (ctype_digit((string)$properties['type']) ? (int)$properties['type'] : $properties['type']); } catch (\TypeError | \BadMethodCallException) { // * Cast anyway From 1c24ce9ea55f491915e80ac7dbfac704ad029c24 Mon Sep 17 00:00:00 2001 From: Alexis Gousseau Date: Thu, 7 Aug 2025 10:39:30 +0200 Subject: [PATCH 2/2] =?UTF-8?q?chore:=20=F0=9F=94=96=20release=20v4.1.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 +++ composer.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 07645f4..1e0c0bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ### All notable changes to `CRM CLient V4` will be documented in this file. +# version 4.1.2 +- Changed: force string cast in ctype_digit method + # version 4.1.1 - Changed: update optionnal answer id parameter when set new single optin for laravel and wordpress diff --git a/composer.json b/composer.json index 467c305..7108217 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "type": "library", "description": "LDC CRM Client V4", "license": "MIT", - "version": "4.1.1", + "version": "4.1.2", "authors": [ { "name": "Jérémy Munsch",