Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removing return statements from File::__construct.

  • Loading branch information...
commit 5f3f66215aff2af90f06dee407a36adcf8f65f97 1 parent f846005
@predominant predominant authored
Showing with 3 additions and 12 deletions.
  1. +3 −12 cake/libs/file.php
View
15 cake/libs/file.php
@@ -88,7 +88,7 @@ class File extends Object {
* @param string $path Path to file
* @param boolean $create Create file if it does not exist (if true)
* @param integer $mode Mode to apply to the folder holding the file
- * @access private
+ * @access public
*/
function __construct($path, $create = false, $mode = 0755) {
parent::__construct();
@@ -97,21 +97,12 @@ function __construct($path, $create = false, $mode = 0755) {
$this->name = basename($path);
}
$this->pwd();
-
- if (!$this->exists()) {
- if ($create === true) {
- if ($this->safe($path) && $this->create() === false) {
- return false;
- }
- } else {
- return false;
- }
- }
+ !$this->exists() && $create === true && $this->safe($path) && $this->create();
}
/**
* Closes the current file if it is opened
*
- * @access private
+ * @access public
*/
function __destruct() {
$this->close();
Please sign in to comment.
Something went wrong with that request. Please try again.