Permalink
Browse files

Updates from comments

Change method name and how version compare is done
  • Loading branch information...
1 parent f5b9bb9 commit d6a37efe7620117a6b092e3362aa257aea57b05d @dogmatic69 committed Apr 2, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/Cake/Utility/File.php
@@ -408,7 +408,7 @@ public function pwd() {
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/file-folder.html#File::exists
*/
public function exists() {
- $this->clearCache();
+ $this->clearStatCache();
return (file_exists($this->path) && is_file($this->path));
}
@@ -574,8 +574,8 @@ public function mime() {
* @param boolean $all Clear all cache or not
* @return void
*/
- public function clearCache($all = false) {
- if ($all === false && floatval(phpversion()) >= 5.3) {
+ public function clearStatCache($all = false) {
+ if ($all === false && version_compare(PHP_VERSION, '5.3.0') >= 0) {
return clearstatcache(true, $this->path);
}

0 comments on commit d6a37ef

Please sign in to comment.