Skip to content

[4.0] Fix edge case PHP Notice in com_finder#27797

Merged
wilsonge merged 1 commit intojoomla:4.0-devfrom
wilsonge:patch-finder
Feb 4, 2020
Merged

[4.0] Fix edge case PHP Notice in com_finder#27797
wilsonge merged 1 commit intojoomla:4.0-devfrom
wilsonge:patch-finder

Conversation

@wilsonge
Copy link
Copy Markdown
Contributor

@wilsonge wilsonge commented Feb 3, 2020

Summary of Changes

Fixes an edge case in com_finder which gave a PHP Notice

Testing Instructions

Create a category in Joomla such as "Article 0 of 1" and save it. Then check your PHP error log (note due to the redirect to the list view you won't see this in the UI) and you'll find a PHP Notice. Apply patch. After patch the notice is gone.

Alternatively you can code review array_filter PHP documentation which tells you array keys are preserved. Which is bad for our for loop later on line 131 here 4.0-dev...wilsonge:patch-finder#diff-6f122d9d8749e848d0ea1343cf256cd1L131.

Documentation Changes Required

None

@wilsonge wilsonge changed the title [4.0] Ensure array keys are reset for any values removed [4.0] Fix edge case PHP Notice in com_finder Feb 3, 2020
@SharkyKZ
Copy link
Copy Markdown
Contributor

SharkyKZ commented Feb 4, 2020

I have tested this item ✅ successfully on 43ae611


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

1 similar comment
@Hackwar
Copy link
Copy Markdown
Member

Hackwar commented Feb 4, 2020

I have tested this item ✅ successfully on 43ae611


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

@alikon
Copy link
Copy Markdown
Contributor

alikon commented Feb 4, 2020

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Feb 4, 2020
@wilsonge wilsonge merged commit 9638a22 into joomla:4.0-dev Feb 4, 2020
@wilsonge
Copy link
Copy Markdown
Contributor Author

wilsonge commented Feb 4, 2020

Thanks guys!

@joomla-cms-bot joomla-cms-bot added PR-4.0-dev and removed RTC This Pull Request is Ready To Commit labels Feb 4, 2020
@wilsonge wilsonge added this to the Joomla 4.0 milestone Feb 4, 2020
brianteeman pushed a commit to brianteeman/joomla-cms that referenced this pull request Feb 4, 2020
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.

5 participants