Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

fix setting of permissions when using file cache #241

Closed
wants to merge 2 commits into from

2 participants

cake/libs/cache/file.php
((7 lines not shown))
- if (!$handle = fopen($this->__File->path, 'a')) {
- return false;
- }
+ if (!$handle) return false;
@markstory Owner

Missing braces here as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@markstory
Owner

Merged in [8947e92]. Thanks again :)

@markstory markstory closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 2 deletions.
  1. +5 −2 cake/libs/cache/file.php
View
7 cake/libs/cache/file.php
@@ -141,9 +141,12 @@ function write($key, &$data, $duration) {
$expires = time() + $duration;
$contents = $expires . $lineBreak . $data . $lineBreak;
+ $old = umask(0);
+ $handle = fopen($this->__File->path, 'a');
+ umask($old);
- if (!$handle = fopen($this->__File->path, 'a')) {
- return false;
+ if (!$handle) {
+ return false;
}
if ($this->settings['lock']) {
Something went wrong with that request. Please try again.