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", 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