Skip to content

Commit d2bb2ba

Browse files
Merge branch '4.0' into 4.1
* 4.0: (21 commits) [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 Fixed return type ...
2 parents c134ae9 + c8b5078 commit d2bb2ba

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Store/FlockStore.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ private function lock(Key $key, $blocking)
7878
);
7979

8080
// Silence error reporting
81-
set_error_handler(function () {
82-
});
81+
set_error_handler(function ($type, $msg) use (&$error) { $error = $msg; });
8382
if (!$handle = fopen($fileName, 'r')) {
8483
if ($handle = fopen($fileName, 'x')) {
8584
chmod($fileName, 0444);
@@ -91,8 +90,7 @@ private function lock(Key $key, $blocking)
9190
restore_error_handler();
9291

9392
if (!$handle) {
94-
$error = error_get_last();
95-
throw new LockStorageException($error['message'], 0, null);
93+
throw new LockStorageException($error, 0, null);
9694
}
9795

9896
// On Windows, even if PHP doc says the contrary, LOCK_NB works, see

0 commit comments

Comments
 (0)