troydavisson/PHRETS — Issue #1: Offset when set to 0
Author: doapp-pete
Created: 2011-11-04 16:57:25+00:00
State: open

There are some MLS vendors i've worked through whom require you to set Offset=0 in order to get the first results. I noticed that on line 516 I see this:

if (!empty($optional_params['Offset'])) {
$search_arguments['Offset'] = $optional_params['Offset'];
}
elseif ($this->offset_support && empty($optional_params['Offset'])) {
// start auto-offset looping with Offset at 1
$search_arguments['Offset'] = 1;
}
else { }

However if my arguement is array('Offset'=>0); it hits the ending else clause {} when my thought is that it would be hitting !empty (as the 0 is a valid request).

To fix this; I changed line 516 to:

if (isset($optional_params['Offset']))

Thanks!