Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Revert "merged branch gajdaw/finder_splfileinfo_fpassthu (PR #4751)" …

…(closes #6224)

This reverts commit 5608c0c, reversing
changes made to 38c30b7.

Conflicts:
	src/Symfony/Component/Finder/SplFileInfo.php
  • Loading branch information...
commit a1734ddf72d9bd85df7bf334fdb1126f9e24b19e 1 parent 947a48d
@fabpot fabpot authored
Showing with 8 additions and 4 deletions.
  1. +8 −4 src/Symfony/Component/Finder/SplFileInfo.php
View
12 src/Symfony/Component/Finder/SplFileInfo.php
@@ -62,10 +62,14 @@ public function getRelativePathname()
*/
public function getContents()
{
- $file = new \SplFileObject($this->getRealpath(), 'rb');
- ob_start();
- $file->fpassthru();
+ $level = error_reporting(0);
+ $content = file_get_contents($this->getRealpath());
+ error_reporting($level);
+ if (false === $content) {
+ $error = error_get_last();
+ throw new \RuntimeException($error['message']);
+ }
- return ob_get_clean();
+ return $content;
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.