Skip to content

Commit bcfb69a

Browse files
authored
Merge pull request #555 from Geolim4/final
Fixed #554
2 parents 9f2a95c + e3a69dd commit bcfb69a

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

src/phpFastCache/Core/Pool/IO/IOHelperTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public function getPath($readonly = false)
114114

115115
/**
116116
* In case there is no directory
117-
* writable including tye temporary
117+
* writable including the temporary
118118
* one, we must throw an exception
119119
*/
120120
if (!@file_exists($full_path) || !@is_writable($full_path)) {

src/phpFastCache/Exceptions/phpFastCacheIOException.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,21 @@
1717
/**
1818
* Class phpFastCacheIOException
1919
* @package phpFastCache\Exceptions
20+
* @since v6
2021
*/
2122
class phpFastCacheIOException extends phpFastCacheCoreException
2223
{
23-
24+
/**
25+
* @inheritdoc
26+
*/
27+
public function __construct($message = "", $code = 0, $previous = null)
28+
{
29+
$lastError = error_get_last();
30+
if($lastError){
31+
$message .= "\n";
32+
$message .= "Additional information provided by error_get_last():\n";
33+
$message .= "{$lastError['message']} in {$lastError['file']} line {$lastError['line']}";
34+
}
35+
parent::__construct($message, $code, $previous);
36+
}
2437
}

0 commit comments

Comments
 (0)