Skip to content

Commit 239d63f

Browse files
author
Maria Grazia Patteri
committed
manage Symfony Maker errors when creating entity
1 parent b9f6944 commit 239d63f

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

src/Symfony/Component/Debug/DebugClassLoader.php

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,8 @@ public function checkCase(\ReflectionClass $refl, $file, $class)
439439

440440
/**
441441
* `realpath` on MacOSX doesn't normalize the case of characters.
442+
*
443+
* @throws \ErrorException
442444
*/
443445
private function darwinRealpath($real)
444446
{
@@ -454,11 +456,17 @@ private function darwinRealpath($real)
454456
if (isset(self::$darwinCache[$kDir])) {
455457
$real = self::$darwinCache[$kDir][0];
456458
} else {
457-
$dir = getcwd();
458-
chdir($real);
459-
$real = getcwd().'/';
460-
chdir($dir);
461-
459+
try {
460+
$dir = getcwd();
461+
chdir($real);
462+
$real = getcwd().'/';
463+
chdir($dir);
464+
} catch (\ErrorException $exception) {
465+
if (E_WARNING === $exception->getSeverity()) {
466+
return $real;
467+
}
468+
throw $exception;
469+
}
462470
$dir = $real;
463471
$k = $kDir;
464472
$i = \strlen($dir) - 1;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy