Skip to content

Commit 2a7c6d2

Browse files
committed
Merge pull request #1 from khoaofgod/final
updated
2 parents 52512ce + cd63b09 commit 2a7c6d2

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

phpfastcache/3.0.0/abstract.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ public function get($keyword, $option = array()) {
5858
if($object == null) {
5959
return null;
6060
}
61-
return isset($option['all_keys']) && $option['all_keys'] ? $object : $object['value'];
61+
62+
$value = isset( $object['value'] ) ? $object['value'] : null;
63+
return isset( $option['all_keys'] ) && $option['all_keys'] ? $object : $value;
6264
}
6365

6466

phpfastcache/3.0.0/phpfastcache.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -172,14 +172,14 @@ public static function getPath($skip_create_path = false, $config) {
172172

173173
if($skip_create_path == false && !isset(self::$tmp[$full_pathx])) {
174174

175-
if(!file_exists($full_path) || !is_writable($full_path)) {
176-
if(!file_exists($full_path)) {
177-
mkdir($full_path,self::__setChmodAuto($config));
175+
if(!@file_exists($full_path) || !@is_writable($full_path)) {
176+
if(!@file_exists($full_path)) {
177+
@mkdir($full_path,self::__setChmodAuto($config));
178178
}
179-
if(!is_writable($full_path)) {
180-
chmod($full_path,self::__setChmodAuto($config));
179+
if(!@is_writable($full_path)) {
180+
@chmod($full_path,self::__setChmodAuto($config));
181181
}
182-
if(!file_exists($full_path) || !is_writable($full_path)) {
182+
if(!@file_exists($full_path) || !@is_writable($full_path)) {
183183
die("Sorry, Please create ".$full_path." and SET Mode 0777 or any Writable Permission!");
184184
}
185185
}

0 commit comments

Comments
 (0)