bug #34091 [Debug] work around failing chdir() on Darwin (mary2501)
This PR was merged into the 4.3 branch.
Discussion
----------
[Debug] work around failing chdir() on Darwin
| Q | A
| ------------- | ---
| Branch? | 4.3 for bug fixes <!-- see below -->
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | Fix https://github.com/happybottoms/coverd/issues/15 <!-- prefix each issue number with "Fix #", if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.
Additionally (see https://symfony.com/roadmap):
- Always add tests and ensure they pass.
- Never break backward compatibility (see https://symfony.com/bc).
- Bug fixes must be submitted against the lowest maintained branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too.)
- Features and deprecations must be submitted against branch 4.4.
- Legacy code removals go to the master branch.
-->
Commits
-------
f40373eb7c
[Debug] work around failing chdir() on Darwin
This commit is contained in:
commit
789c863233
@ -455,7 +455,11 @@ class DebugClassLoader
|
||||
$real = self::$darwinCache[$kDir][0];
|
||||
} else {
|
||||
$dir = getcwd();
|
||||
chdir($real);
|
||||
|
||||
if (!@chdir($real)) {
|
||||
return $real.$file;
|
||||
}
|
||||
|
||||
$real = getcwd().'/';
|
||||
chdir($dir);
|
||||
|
||||
|
Reference in New Issue
Block a user