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.
Comments
Comment #1
douggreen commentedrerolled, with proper diff (I hope)
Comment #2
chx commentedVery very nice job.
Comment #3
moshe weitzman commentedYeah, +1 from me too.
Comment #4
dries commentedCommitted to CVS HEAD. Thanks!