Skip to content

Commit

Permalink
Merge pull request #13 from dfelton/bugfix/restore-cache
Browse files Browse the repository at this point in the history
property could not be accessed before initialization
  • Loading branch information
dfelton authored Feb 14, 2023
2 parents 0866dc4 + 50a495a commit a829a5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

final class Cache
{
private static StorageInterface $instance;
private static ?StorageInterface $instance = null;

public static function getInstance(): StorageInterface
{
if (!self::$instance) {
if (self::$instance === null) {
$dir = Config::getInstance()->getRootDir().'/var/cache';
self::$instance = StorageFactory::factory([
'adapter' => 'filesystem',
Expand Down

0 comments on commit a829a5c

Please sign in to comment.