diff --git a/src/Command/CompoundFind.php b/src/Command/CompoundFind.php index 69af0e8..8006a80 100644 --- a/src/Command/CompoundFind.php +++ b/src/Command/CompoundFind.php @@ -90,7 +90,7 @@ public function execute() ksort($this->requests); $totalRequestCount = count($this->requests); - + foreach ($this->requests as $precedence => $request) { $findCriterias = $request->findCriteria; $critCount = count($findCriterias); @@ -227,7 +227,7 @@ public function setRangeParams(&$params) if ($this->skip) { $params['-skip'] = $this->skip; } - if ($this->max) { + if ($this->max !== null) { $params['-max'] = $this->max; } } diff --git a/src/Command/Find.php b/src/Command/Find.php index 7059203..31389d9 100644 --- a/src/Command/Find.php +++ b/src/Command/Find.php @@ -237,7 +237,7 @@ protected function setRangeParams(&$params) if ($this->skip) { $params['-skip'] = $this->skip; } - if ($this->max) { + if ($this->max !== null) { $params['-max'] = $this->max; } } diff --git a/src/Parser/FMResultSet.php b/src/Parser/FMResultSet.php index 7f6d006..88fd334 100644 --- a/src/Parser/FMResultSet.php +++ b/src/Parser/FMResultSet.php @@ -82,6 +82,7 @@ public function parse($xml) ); } xml_parser_free($this->xmlParser); + unset($this->xmlParser); if (!empty($this->errorCode)) { return $this->fm->returnOrThrowException(null, $this->errorCode); }