Skip to content

Multiple driver errors caused by invalid return type of driverRead() #862

Closed
@ShockedPlot7560

Description

@ShockedPlot7560

Configuration

  • PhpFastCache version: 9.0.2
  • PhpFastCache API version: 4.0.0
  • PHP version: 8.0.13
  • Operating system: Ubuntu

Describe the bug

I don't really know the nature of the bug, but it seems to come from the File driver Phpfastcache\Drivers\Files\Driver::driverRead()

To Reproduce
Code to reproduce the issue:

/** @var ExtendedCacheItemPoolInterface */
$cacheManager = $this->container->get(CacheManager::class);
$cacheString = "SimplyString";
$cacheItem = $cacheManager->getItem($cacheString);

Driver used : files

Stacktrace

TypeError: Phpfastcache\Drivers\Files\Driver::driverRead(): Return value must be of type ?array, bool returned in /var/www/html/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Files/Driver.php:74
Stack trace:
#0 /var/www/html/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/CacheItemPoolTrait.php(132): Phpfastcache\Drivers\Files\Driver->driverRead(Object(Phpfastcache\Drivers\Files\Item))
#1 /var/www/html/src/core/middleware/MaintenanceMiddleware.php(32): Phpfastcache\Drivers\Files\Driver->getItem('MaintenanceAuto...')
...
#7 {main}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions