Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
While I can't point to any core bug this causes, and this can be solved in contrib, I think that we should save and restore the current working directory because this is a known problem with register_shutdown_function (see comments in thread) and a potential hazard for many people.
I just spent several hours tracking this down from devel, to our stream wrappers, and finally to the fact that the current-working-directory was changed to /. This is a very easy fix in core, very few extra lines, and will probably save other developers lots of time.
Comment | File | Size | Author |
---|---|---|---|
#1 | 756498.patch | 748 bytes | douggreen |
shutdown-cwd.patch | 668 bytes | douggreen | |
Comments
Comment #1
douggreen CreditAttribution: douggreen commentedrerolled, with proper diff (I hope)
Comment #2
chx CreditAttribution: chx commentedVery very nice job.
Comment #3
moshe weitzman CreditAttribution: moshe weitzman commentedYeah, +1 from me too.
Comment #4
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks!