Skip to content

Commit

Permalink
Ensure $length is always a valid value.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Sep 21, 2015
1 parent 092830a commit 253a4de
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -233,8 +233,9 @@ protected function _searchLocations($location)
* a bit of request time/traffic for a smaller number of requests to obtain
* information for e.g., a typical weather portal display.
*/
protected function _getCommonElements($location, $length = Horde_Service_Weather::FORECAST_10DAY)
protected function _getCommonElements($location, $length = null)
{
$length = empty($length) ? Horde_Service_Weather::FORECAST_10DAY : $length;
if (!empty($this->_forecast) && $location == $this->_lastLocation
&& $this->_lastLength >= $length) {

Expand Down

0 comments on commit 253a4de

Please sign in to comment.