This reverts commit5608c0c3ee
, reversing changes made to38c30b71bd
. Conflicts: src/Symfony/Component/Finder/SplFileInfo.php
This commit is contained in:
parent
947a48dbf6
commit
a1734ddf72
@ -62,10 +62,14 @@ class SplFileInfo extends \SplFileInfo
|
|||||||
*/
|
*/
|
||||||
public function getContents()
|
public function getContents()
|
||||||
{
|
{
|
||||||
$file = new \SplFileObject($this->getRealpath(), 'rb');
|
$level = error_reporting(0);
|
||||||
ob_start();
|
$content = file_get_contents($this->getRealpath());
|
||||||
$file->fpassthru();
|
error_reporting($level);
|
||||||
|
if (false === $content) {
|
||||||
|
$error = error_get_last();
|
||||||
|
throw new \RuntimeException($error['message']);
|
||||||
|
}
|
||||||
|
|
||||||
return ob_get_clean();
|
return $content;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user