diff --git a/CHANGES.md b/CHANGES.md index 5b1a02ee..667918b8 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,7 @@ * Add PodioTagItemField type * Adding filter API missing file_count parameter * Add scope to PodioOAuth +* Bugfix: rate limit header parsing (#81) 4.4.0 / 2019-06-02 diff --git a/lib/Podio.php b/lib/Podio.php index d5b02f39..98bbcc56 100644 --- a/lib/Podio.php +++ b/lib/Podio.php @@ -404,13 +404,13 @@ public static function parse_headers($headers) { return $list; } public static function rate_limit_remaining() { - if (isset($last_response->headers['x-rate-limit-remaining'])) { + if (isset(self::$last_response->headers['x-rate-limit-remaining'])) { return self::$last_response->headers['x-rate-limit-remaining']; } } public static function rate_limit() { - if (isset($last_response->headers['x-rate-limit'])) { - return self::$last_response->headers['x-rate-limit']; + if (isset(self::$last_response->headers['x-rate-limit-limit'])) { + return self::$last_response->headers['x-rate-limit-limit']; } }