Skip to content

Commit 6d5642a

Browse files
committed
DD#0000: feat: Apparently WP have changed their headers
1 parent 98aa759 commit 6d5642a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Model/Api/ApiAbstract.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function getCollection($params = array())
7575

7676
$collection = $this->_createCollection(\Zend_Json::decode($response->getBody()));
7777

78-
if ($totalPages = $response->getHeader('X-WP-TotalPages')) {
78+
if ($totalPages = $response->getHeader('x-wp-totalpages')) {
7979
if (is_array($totalPages)) {
8080
$totalPages = $totalPages[0];
8181
}

src/Model/Index/Spider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function getPaths()
9898

9999
$headers = $response->getHeaders();
100100

101-
if (!isset($headers['X-WP-TotalPages']) || $headers['X-WP-TotalPages'][0] <= $page) {
101+
if (!isset($headers['x-wp-totalpages']) || $headers['x-wp-totalpages'][0] <= $page) {
102102
$nextPage = false;
103103
}
104104
$page++;

0 commit comments

Comments
 (0)