Skip to content

Commit 6a32f39

Browse files
Merge branch '4.1'
* 4.1: (22 commits) Fix CS [PropertyInfo] fix resolving parent|self type hints fixed CS fix merge [Security] Fix logout Cleanup 2 tests for the HttpException classes #27250 limiting GET_LOCK key up to 64 char due to changes in MySQL 5.7.5 and later [Config] Fix tests when path contains UTF chars [DI] Shared services should not be inlined in non-shared ones [Profiler] Remove propel & event_listener_loading category identifiers [Filesystem] Fix usages of error_get_last() [Cache][Lock] Fix usages of error_get_last() [Debug] Fix populating error_get_last() for handled silent errors fixed CS fixed CS fixed CS [FrameworkBundle] Fix cache:clear on vagrant [HttpKernel] Handle NoConfigurationException "onKernelException()" Fix misses calculation when calling getItems [DI] Display previous error messages when throwing unused bindings ...
2 parents f848cbe + 4930ceb commit 6a32f39

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

SplFileInfo.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,11 @@ public function getRelativePathname()
6666
*/
6767
public function getContents()
6868
{
69-
$level = error_reporting(0);
69+
set_error_handler(function ($type, $msg) use (&$error) { $error = $msg; });
7070
$content = file_get_contents($this->getPathname());
71-
error_reporting($level);
71+
restore_error_handler();
7272
if (false === $content) {
73-
$error = error_get_last();
74-
throw new \RuntimeException($error['message']);
73+
throw new \RuntimeException($error);
7574
}
7675

7776
return $content;

0 commit comments

Comments
 (0)