? ? Pending

User tests: Successful: Unsuccessful:

avatar PhilETaylor
PhilETaylor
24 May 2021

Code review.

Diff makes this change look worse than it really is haha

avatar PhilETaylor PhilETaylor - open - 24 May 2021
avatar PhilETaylor PhilETaylor - change - 24 May 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 24 May 2021
Category Libraries
avatar PhilETaylor PhilETaylor - change - 24 May 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 24 May 2021
avatar richard67 richard67 - test_item - 24 May 2021 - Tested successfully
avatar richard67
richard67 - comment - 24 May 2021

I have tested this item successfully on 068d79d

With a good merge tool like e.g. Beyond Compare the diff looks much better than on GitHub.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/34172.

avatar wilsonge
wilsonge - comment - 24 May 2021

you can just add ?w=1 on the end of the URL to ignore whitespace ;)

So the only thing that kinda concerns me is when Nic rewrote this code (#5499) he clearly seemed to think there was some specific use case here because he commented it all up. I mean it might well just be an oversight but is it possible to have an empty menu element tag that will be an empty XMLElement or something stupid and non-strict type checks will treat them differently...

avatar PhilETaylor
PhilETaylor - comment - 24 May 2021

Before my modified code is

// Just do not create the menu if $menuElement not exist		
if (!$menuElement)		
{			
    return true;		
}

Therefore there is no way for the modified removed code to run... even phpStorm says so :)

avatar richard67
richard67 - comment - 24 May 2021

Right. If there were typesafe comparisons used, then a null could make a difference, but as it is now, I think the PR here is right.

avatar wilsonge
wilsonge - comment - 24 May 2021

Before my modified code is

I understand - but that line was added in that linked PR. That's the only reason I'm hesitating a bit. You're probably right. Just trying to figure out any weird edge cases in my head

avatar joomdonation joomdonation - test_item - 25 May 2021 - Tested successfully
avatar joomdonation
joomdonation - comment - 25 May 2021

I have tested this item successfully on 068d79d


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/34172.

avatar joomdonation joomdonation - change - 25 May 2021
Status Pending Ready to Commit
avatar joomdonation
joomdonation - comment - 25 May 2021

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/34172.

avatar joomdonation
joomdonation - comment - 25 May 2021

@wilsonge Reviewed the code carefully. This PR is right and safe to merge. You can trust three of us :D.

avatar wilsonge wilsonge - merge - 25 May 2021
avatar wilsonge wilsonge - close - 25 May 2021
avatar wilsonge wilsonge - change - 25 May 2021
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-05-25 14:37:29
Closed_By wilsonge
Labels Added: ? ?
avatar wilsonge
wilsonge - comment - 25 May 2021

fiiine. i conceed :) thanks guys!

Add a Comment

Login with GitHub to post a comment