diff --git a/.gitignore b/.gitignore index b8e18a5..185c6b8 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ /.idea/codeStyleSettings.xml /demo-json/ff.log /.idea +build/ diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 72c61bc..f37a1fb 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,6 @@ +Version 2.5.6 + FIX: products per page options may be null at json response although result exists + Version 2.5.5 CHG: SCIC adapters now exist for all versions (and both interfaces), because the action changes in FF 6.8. ADD: Legacy Tracking Adapter which can be used for FF6.8 and 6.9 diff --git a/build.xml b/build.xml index 6f2e21a..28d01d0 100644 --- a/build.xml +++ b/build.xml @@ -2,7 +2,7 @@ - + diff --git a/lib/FACTFinder/Json66/SearchAdapter.php b/lib/FACTFinder/Json66/SearchAdapter.php index 34afb4f..3389b35 100644 --- a/lib/FACTFinder/Json66/SearchAdapter.php +++ b/lib/FACTFinder/Json66/SearchAdapter.php @@ -168,7 +168,11 @@ protected function getResultFromRawResult($jsonData) { $encodingHandler = $this->getEncodingHandler(); $paging = $this->getPaging(); - $positionOffset = ($paging->getCurrentPageNumber() - 1) * $this->getProductsPerPageOptions()->getSelectedOption()->getValue(); + if ($paging != null && $this->getProductsPerPageOptions() != null && $this->getProductsPerPageOptions()->getSelectedOption() != null) { + $positionOffset = ($paging->getCurrentPageNumber() - 1) * $this->getProductsPerPageOptions()->getSelectedOption()->getValue(); + } else { + $positionOffset = 0; + } //load result $positionCounter = 1; diff --git a/tests/resources/config.xml b/tests/resources/config.xml index d90b745..8e5e760 100644 --- a/tests/resources/config.xml +++ b/tests/resources/config.xml @@ -15,7 +15,7 @@ FACT-FINDER FACT-FINDER - FACT-Finder + FACT-Finder6.9 de de