Merge branch 'develop'

This commit is contained in:
Vincent BRIDIER 2025-08-07 10:41:03 +02:00
commit 3cd9a83dd2
No known key found for this signature in database
GPG key ID: 8571BFA20420D512
5 changed files with 7 additions and 4 deletions

View file

@ -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

View file

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

View file

@ -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

View file

@ -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

View file

@ -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