From 4f2c86e6d3259a94c75ba39bff8247b92288d6fc Mon Sep 17 00:00:00 2001 From: Ignace Nyamagana Butera Date: Wed, 5 Aug 2020 07:13:41 +0200 Subject: [PATCH] #280 bug fix cache throws when default cache directory is not present --- CHANGELOG.md | 19 +++++++++++++++++++ src/Cache.php | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12d73bb7..a1e9ed2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,24 @@ All Notable changes to `PHP Domain Parser` **5.x** series will be documented in this file +## 5.7.1 - 2020-08-04 + +### Added + +- None + +### Fixed + +- Cache throws when cache directory doesn't exist [#280](https://github.com/jeremykendall/php-domain-parser/issues/280) + +### Deprecated + +- None + +### Removed + +- None + ## 5.7.0 - 2020-08-02 ### Added @@ -15,6 +33,7 @@ All Notable changes to `PHP Domain Parser` **5.x** series will be documented in - Improve type hinting and return type by dropping EOL PHP versions support. - Improve development environment by dropping EOL PHP versions support. +- Composer script ### Deprecated diff --git a/src/Cache.php b/src/Cache.php index a2ca4ce7..69e47ea1 100644 --- a/src/Cache.php +++ b/src/Cache.php @@ -83,7 +83,7 @@ public function __construct(string $cache_path = '') { if ('' === $cache_path) { /** @var string $cache_path */ - $cache_path = realpath(dirname(__DIR__).DIRECTORY_SEPARATOR.'data'); + $cache_path = realpath(dirname(__DIR__)).DIRECTORY_SEPARATOR.'data'; } if (!file_exists($cache_path) && file_exists(dirname($cache_path))) {