Skip to content

Commit

Permalink
Merge branch 'master' into haste5
Browse files Browse the repository at this point in the history
  • Loading branch information
salteax authored Nov 16, 2023
2 parents db88fde + 80734fe commit 50615e5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ All notable changes to this project will be documented in this file.
- Added: dynamically load either StringUtil or StringParser methods based on which version of contao-haste is installed
- Changed: adapt StringUtil to haste 5 changes

## [1.15.14] - 2023-02-28
- Fixed: invalid return type

## [1.15.13] - 2023-02-22
- Fixed: invalid syntax

## [1.15.12] - 2023-01-09
- Changed: allow phpfastcache 7 for usage in projects with php 8
- Changed: adapt usage of phpfastcache to work with the new version
Expand Down
2 changes: 1 addition & 1 deletion library/Haste/Cache/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function __construct(string $driver = 'auto', $config = null)
*
* @return Cache The object instance
*/
public static function getInstance($config = null): Cache
public static function getInstance($config = null)
{
if (static::$objInstance === null) {
static::$objInstance = CacheManager::getInstance(static::$driver, self::getOptions($config));
Expand Down
6 changes: 5 additions & 1 deletion library/Haste/Cache/FileCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@ class FileCache extends Cache

protected static $driver = 'files';

protected static function extendOptions($config = new ConfigurationOption): ConfigurationOption
protected static function extendOptions($config = null): ConfigurationOption
{
if (!$config) {
$config = new ConfigurationOption();
}

$filename = TL_ROOT . '/' . ltrim(self::$cacheDir, '/');

if (!is_dir($filename)) {
Expand Down

0 comments on commit 50615e5

Please sign in to comment.