Merge pull request #19683 from kamil-tekiela/Access-property-directly

Access property directly
This commit is contained in:
Maurício Meneghini Fauth 2025-04-28 16:52:29 -03:00 committed by GitHub
commit c2ba3c9211
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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;
}