joomla/joomla-platform — pull request #487 by Hackwar (2011-11-04 21:48:35+00:00)
Title: JModellist: Replacing !empty() with isset() for performance

JModellist uses !empty() to check for cached data. If the query returned an empty result, the array key is set, but the variable is empty, thus the caching does not take effect and the query is executed again when the function is called again. Using isset() instead only checks if the variable has already been set (=the query has been executed) and then returns that result, regardless if that result is empty or not.