Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/45' into develop, Forward port #45
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-mabe committed Dec 20, 2015
2 parents d2cf8dd + 0568a6b commit d14184a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 30 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ All notable changes to this project will be documented in this file, in reverse

### Fixed

- [#45](https://github.com/zendframework/zend-cache/pull/45)
removed unused internal function Filesystem::readInfoFile
- [#25](https://github.com/zendframework/zend-cache/pull/25)
MongoDd: fixed expiration support and removed duplicated tests
- [#40](https://github.com/zendframework/zend-cache/pull/40)
Expand Down
30 changes: 0 additions & 30 deletions src/Storage/Adapter/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -1274,36 +1274,6 @@ protected function getFileSpec($normalizedKey)
return $this->lastFileSpec;
}

/**
* Read info file
*
* @param string $file
* @param bool $nonBlocking Don't block script if file is locked
* @param bool $wouldblock The optional argument is set to TRUE if the lock would block
* @return array|bool The info array or false if file wasn't found
* @throws Exception\RuntimeException
*/
protected function readInfoFile($file, $nonBlocking = false, & $wouldblock = null)
{
if (!file_exists($file)) {
return false;
}

$content = $this->getFileContent($file, $nonBlocking, $wouldblock);
if ($nonBlocking && $wouldblock) {
return false;
}

ErrorHandler::start();
$ifo = unserialize($content);
$err = ErrorHandler::stop();
if (!is_array($ifo)) {
throw new Exception\RuntimeException("Corrupted info file '{$file}'", 0, $err);
}

return $ifo;
}

/**
* Read a complete file
*
Expand Down

0 comments on commit d14184a

Please sign in to comment.