Access property directly

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
This commit is contained in:
Kamil Tekiela 2025-04-28 00:06:27 +01:00
parent a23e1bfe9c
commit a18547ca3f
2 changed files with 3 additions and 3 deletions

View File

@ -7119,7 +7119,7 @@
<code><![CDATA[string[]]]></code>
</PossiblyUnusedReturnValue>
<RedundantCondition>
<code><![CDATA[$paragraphValue === '' && isset($paragraph->{'a'})]]></code>
<code><![CDATA[$paragraphValue === '' && isset($paragraph->a)]]></code>
</RedundantCondition>
</file>
<file src="src/Plugins/Import/ImportShp.php">

View File

@ -221,8 +221,8 @@ class ImportOds extends ImportPlugin
// Maybe a text node has the content ? (email, url, ...)
// Example: <text:a ... xlink:href="mailto:contact@example.org">test@example.fr</text:a>
$paragraphValue = $paragraph->__toString();
if ($paragraphValue === '' && isset($paragraph->{'a'})) {
$values[] = $paragraph->{'a'}->__toString();
if ($paragraphValue === '' && isset($paragraph->a)) {
$values[] = $paragraph->a->__toString();
continue;
}