From 967e0358f5548bf16e0b8655b9ba2b4457640484 Mon Sep 17 00:00:00 2001 From: Julien Rosset Date: Fri, 17 Jul 2026 10:48:41 +0200 Subject: [PATCH] =?UTF-8?q?AttributeSingleXmlStructure=20:=20nom=20attribu?= =?UTF-8?q?t=20insensible=20=C3=A0=20la=20casse?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../XmlStructure/AttributeSingleXmlStructure.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/EnvReader/XmlStructure/AttributeSingleXmlStructure.php b/src/EnvReader/XmlStructure/AttributeSingleXmlStructure.php index 4050289..2311624 100644 --- a/src/EnvReader/XmlStructure/AttributeSingleXmlStructure.php +++ b/src/EnvReader/XmlStructure/AttributeSingleXmlStructure.php @@ -26,6 +26,13 @@ class AttributeSingleXmlStructure implements IXmlStructure { * @inheritDoc */ public function parseXml (SimpleXMLElement $xmlNode): string { - return (string)$xmlNode[$this->attributeName]; + if (($attributes = $xmlNode->attributes()) !== null) { + foreach ($attributes as $attributeName => $attributeValue) { + if (mb_strtolower($attributeName) === mb_strtolower($this->attributeName)) { + return (string)$attributeValue; + } + } + } + return ''; } } \ No newline at end of file