Skip to content

Commit 78bf66f

Browse files
authored
fixed bug in Apcu driver.
The Apcu driver passes `$stats['mem_size']` to the function `setSize()` of `DriverStatistic`. This generates an error due to type mismatch. The function `setSize()` expects and integer while `$stats['mem_size']` is a float.
1 parent 3cb5fc5 commit 78bf66f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Phpfastcache/Drivers/Apcu/Driver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,6 @@ public function getStats(): DriverStatistic
127127
->setInfo(\sprintf("The APCU cache is up since %s, and have %d item(s) in cache.\n For more information see RawData.", $date->format(\DATE_RFC2822),
128128
$stats['num_entries']))
129129
->setRawData($stats)
130-
->setSize($stats['mem_size']);
130+
->setSize((int)$stats['mem_size']);
131131
}
132-
}
132+
}

0 commit comments

Comments
 (0)