Skip to content

Commit

Permalink
Fix cases where folder may not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
sc0ttkclark committed Apr 16, 2014
1 parent 5fcfdf0 commit c90b9b7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pods-alternative-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,9 @@ function pods_alternative_cache_file_set( $cache_key, $cache_value, $expires = 0
$path = PODS_ALT_FILE_CACHE_DIR . DIRECTORY_SEPARATOR . $current_blog_id . '-' . md5( $cache_key ) . '.php';

if ( !@is_dir( PODS_ALT_FILE_CACHE_DIR ) ) {
return false;
if ( !@mkdir( PODS_ALT_FILE_CACHE_DIR, 0777 ) ) {
return false;
}
}

if ( '' === $cache_value ) {
Expand Down

0 comments on commit c90b9b7

Please sign in to comment.