joomla/joomla-cms — pull request #2786 by Bakual (2014-01-12 20:19:53+00:00)
Title: Removing `else` so the fallbacks indeed get used

### Issue
If the RouteHelper doesn't find a matching Itemid (menu item) for a given article, it will just return nothing.
It should however fall back to the currently active Itemid instead.
This bug basically is a regression from a previous PR https://github.com/joomla/joomla-cms/pull/1708. However since the PR itself is good and fixes a valid issue, I don't want to revert it.

### Proposed Fix
This PR only takes the fallback code out of the if-else clause in the `_findItem()` function. The `else` makes no sense anymore since we always have `$needles`. With this PR if nothing is found using the `$needles`, it will return the current active Itemid like it used to be.

#### Tracker
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=33011
Also some discussion on https://groups.google.com/d/topic/joomlabugsquad/-UyLy58q95Y/discussion