From 107d8ba0af9e0b1a9c60a5c8b44eaba585e26740 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Fri, 11 Jun 2021 16:43:59 +0200 Subject: [PATCH] LSformElement supannRessourceEtat & supannRessourceEtatDate: do not check etat value on parsing attribute value --- src/includes/class/class.LSformElement_supannRessourceEtat.php | 2 +- .../class/class.LSformElement_supannRessourceEtatDate.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/includes/class/class.LSformElement_supannRessourceEtat.php b/src/includes/class/class.LSformElement_supannRessourceEtat.php index 795d2857..c080c4f3 100644 --- a/src/includes/class/class.LSformElement_supannRessourceEtat.php +++ b/src/includes/class/class.LSformElement_supannRessourceEtat.php @@ -66,7 +66,7 @@ class LSformElement_supannRessourceEtat extends LSformElement_supannCompositeAtt * @return array|null La valeur parsée, ou NULL en cas de problème */ public function parseCompositeValue($value) { - if (preg_match('/\{(?[^\}]+)\}(?[AIS])(:(?.*))?/', $value, $matches)) { + if (preg_match('/\{(?[^\}]+)\}(?[^:]+)(:(?.*))?/', $value, $matches)) { $parseValue = array( 'ressource' => $matches['ressource'], 'etat' => $matches['etat'], diff --git a/src/includes/class/class.LSformElement_supannRessourceEtatDate.php b/src/includes/class/class.LSformElement_supannRessourceEtatDate.php index 5862beb0..d20900fc 100644 --- a/src/includes/class/class.LSformElement_supannRessourceEtatDate.php +++ b/src/includes/class/class.LSformElement_supannRessourceEtatDate.php @@ -78,7 +78,7 @@ class LSformElement_supannRessourceEtatDate extends LSformElement_supannComposit * @return array|null La valeur parsée, ou NULL en cas de problème */ public function parseCompositeValue($value) { - if (preg_match('/\{(?[^\}]+)\}(?[AIS]):(?[^\:]*):(?[0-9]{8})?:(?[0-9]{8})?/', $value, $matches)) { + if (preg_match('/\{(?[^\}]+)\}(?[^:]+):(?[^\:]*):(?[0-9]{8})?:(?[0-9]{8})?/', $value, $matches)) { $parseValue = array( 'ressource' => $matches['ressource'], 'etat' => $matches['etat'],