Skip to content
Browse files

Fixed getTotalSpace of filesystem adapter

  • Loading branch information...
1 parent 59db392 commit 7e1e868f28d8b2451f092878a18369f22e90d1f2 @marc-mabe committed Sep 17, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 library/Zend/Cache/Storage/Adapter/Filesystem.php
View
5 library/Zend/Cache/Storage/Adapter/Filesystem.php
@@ -391,7 +391,7 @@ public function optimize()
*/
public function getTotalSpace()
{
- if ($this->totalSpace !== null) {
+ if ($this->totalSpace === null) {
$path = $this->getOptions()->getCacheDir();
ErrorHandler::start();
@@ -400,6 +400,7 @@ public function getTotalSpace()
if ($total === false) {
throw new Exception\RuntimeException("Can't detect total space of '{$path}'", 0, $error);
}
+ $this->totalSpace = $total;
// clean total space buffer on change cache_dir
$events = $this->getEventManager();
@@ -412,7 +413,7 @@ public function getTotalSpace()
$events->detach($handle);
}
};
- $handle = $events->attach($callback);
+ $handle = $events->attach('option', $callback);
}
return $this->totalSpace;

0 comments on commit 7e1e868

Please sign in to comment.
Something went wrong with that request. Please try again.