There may be a slight performance gain from this as getcwd() might make a system call.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | shutdown-cwd.patch | 1.01 KB | jbrown |
| #4 | 761212.patch | 537 bytes | droplet |
| #2 | use-drupal-root-constant.patch | 652 bytes | jbrown |
| use-drupal-root-constant.patch | 1.31 KB | jbrown |
Comments
Comment #2
jbrown commentedComment #3
jbrown commentedComment #4
droplet commentedre-roll against head
Comment #5
Freso commentedPasses tests and makes good sense. RTBC, AFAICT.
Comment #6
webchickThis seems like a straight-forward fix that shouldn't break anything (famous last words :D).
Committed to HEAD.
Comment #7
jbrown commentedThe code is actually more complicated than it needs to be.
Every callback has the same 'cwd' value - DRUPAL_ROOT.
_drupal_shutdown_function() is setting the cwd for each callback, but they will always be the same.
The cwd only needs to be set once a the start of the function.
See notes section at http://php.net/register-shutdown-function
Comment #8
moshe weitzman commentedlooks good.
Comment #9
eric_a commentedComment #10
webchickCommitted to HEAD. Thanks!