Skip to content

[4] Remove unset call as $xml is not set when here#32054

Merged
HLeithner merged 1 commit intojoomla:4.0-devfrom
PhilETaylor:removeunset
Jan 16, 2021
Merged

[4] Remove unset call as $xml is not set when here#32054
HLeithner merged 1 commit intojoomla:4.0-devfrom
PhilETaylor:removeunset

Conversation

@PhilETaylor
Copy link
Copy Markdown
Contributor

Remove unset call as $xml is not set when here

Code review.

$xml is only set in the nested foreach statement, and already unset before the return and continue within that.

Signed-off-by: Phil E. Taylor <phil@phil-taylor.com>
@HLeithner HLeithner merged commit d49e461 into joomla:4.0-dev Jan 16, 2021
@HLeithner
Copy link
Copy Markdown
Member

I'm wrong when I say that the $xml is unset automatically on return if not referenced to the object it self or used outside this function? Even the unset in the loop before continue look use less because the $xml will be reassigned in the next run.

@HLeithner HLeithner added this to the Joomla 4.0 milestone Jan 16, 2021
@HLeithner
Copy link
Copy Markdown
Member

Thanks btw

dgrammatiko pushed a commit to dgrammatiko/joomla-cms that referenced this pull request Jan 17, 2021
Signed-off-by: Phil E. Taylor <phil@phil-taylor.com>
dgrammatiko pushed a commit to dgrammatiko/joomla-cms that referenced this pull request Jan 20, 2021
Signed-off-by: Phil E. Taylor <phil@phil-taylor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants