-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Offset when set to 0 #1
Comments
Closed
collegeman
added a commit
to collegeman/PHRETS
that referenced
this issue
Jul 7, 2017
Running version 2.4 on PHP 7.1.4, was getting an error message: [2017-07-07 18:23:35] local.ERROR: ErrorException: PHRETS\Parsers\GetMetadata\System::parse(): Node no longer exists in /Users/aaron/repos/c21redwood/c21-backoffice/vendor/troydavisson/phrets/src/Parsers/GetMetadata/System.php:29 Stack trace: #0 /Users/aaron/repos/c21redwood/c21-backoffice/vendor/troydavisson/phrets/src/Parsers/GetMetadata/System.php(29): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'PHRETS\\Parsers\\...', '/Users/aaron/re...', 29, Array) troydavisson#1 /Users/aaron/repos/c21redwood/c21-backoffice/vendor/troydavisson/phrets/src/Session.php(244): PHRETS\Parsers\GetMetadata\System->parse(Object(PHRETS\Session), Object(PHRETS\Http\Response), NULL) troydavisson#2 /Users/aaron/repos/c21redwood/c21-backoffice/vendor/troydavisson/phrets/src/Session.php(153): PHRETS\Session->MakeMetadataRequest('METADATA-SYSTEM', 0, Object(PHRETS\Parsers\GetMetadata\System)) troydavisson#3 /Users/aaron/repos/c21redwood/c21-backoffice/app/Console/Commands/RetsLogin.php(55): PHRETS\Session->GetSystemMetadata() troydavisson#4 [internal function]: App\Console\Commands\RetsLogin->handle() troydavisson#5 /Users/aaron/repos/c21redwood/c21-backoffice/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Array, Array) troydavisson#6 /Users/aaron/repos/c21redwood/c21-backoffice/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() troydavisson#7 /Users/aaron/repos/c21redwood/c21-backoffice/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure)) troydavisson#8 /Users/aaron/repos/c21redwood/c21-backoffice/vendor/laravel/framework/src/Illuminate/Container/Container.php(539): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL) troydavisson#9 /Users/aaron/repos/c21redwood/c21-backoffice/vendor/laravel/framework/src/Illuminate/Console/Command.php(182): Illuminate\Container\Container->call(Array) troydavisson#10 /Users/aaron/repos/c21redwood/c21-backoffice/vendor/symfony/console/Command/Command.php(264): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle)) troydavisson#11 /Users/aaron/repos/c21redwood/c21-backoffice/vendor/laravel/framework/src/Illuminate/Console/Command.php(167): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle)) troydavisson#12 /Users/aaron/repos/c21redwood/c21-backoffice/vendor/symfony/console/Application.php(869): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) troydavisson#13 /Users/aaron/repos/c21redwood/c21-backoffice/vendor/symfony/console/Application.php(223): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\RetsLogin), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) troydavisson#14 /Users/aaron/repos/c21redwood/c21-backoffice/vendor/symfony/console/Application.php(130): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) troydavisson#15 /Users/aaron/repos/c21redwood/c21-backoffice/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(122): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) troydavisson#16 /Users/aaron/repos/c21redwood/c21-backoffice/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) troydavisson#17 {main} Renaming the property `SYSTEM` to `System` fixes the problem.
Open
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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!
The text was updated successfully, but these errors were encountered: