update2
This commit is contained in:
parent
98419bd18d
commit
8a69e45efa
4919 changed files with 28311 additions and 224136 deletions
9
pfosten/vendor/symfony/finder/SplFileInfo.php
vendored
Executable file → Normal file
9
pfosten/vendor/symfony/finder/SplFileInfo.php
vendored
Executable file → Normal file
|
|
@ -22,8 +22,6 @@ class SplFileInfo extends \SplFileInfo
|
|||
private $relativePathname;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $file The file name
|
||||
* @param string $relativePath The relative path
|
||||
* @param string $relativePathname The relative path name
|
||||
|
|
@ -68,12 +66,11 @@ class SplFileInfo extends \SplFileInfo
|
|||
*/
|
||||
public function getContents()
|
||||
{
|
||||
$level = error_reporting(0);
|
||||
set_error_handler(function ($type, $msg) use (&$error) { $error = $msg; });
|
||||
$content = file_get_contents($this->getPathname());
|
||||
error_reporting($level);
|
||||
restore_error_handler();
|
||||
if (false === $content) {
|
||||
$error = error_get_last();
|
||||
throw new \RuntimeException($error['message']);
|
||||
throw new \RuntimeException($error);
|
||||
}
|
||||
|
||||
return $content;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue