Skip to content

Commit 534131c

Browse files
authored
Merge pull request #27 from ipinfo/uman/init-array
Init cache "element queue" before use.
2 parents ce3d01c + e918fbd commit 534131c

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# CHANGELOG
22

3+
### 2.1.1 (January 12 2021)
4+
5+
- Bug fix issue reported in Laravel SDK
6+
(https://github.com/ipinfo/laravel/issues/14) which also applies in PHP SDK,
7+
with https://github.com/ipinfo/php/pull/27.
8+
39
### 2.1.0 (December 2 2020)
410

511
- Deprecate PHP 7.2 support.

src/cache/DefaultCache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class DefaultCache implements CacheInterface
1717
public function __construct(int $maxsize, int $ttl)
1818
{
1919
$this->cache = new \Sabre\Cache\Memory();
20-
$this->element_queue;
20+
$this->element_queue = array();
2121
$this->maxsize = $maxsize;
2222
$this->ttl = $ttl;
2323
}

0 commit comments

Comments
 (0)