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.
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 CreditAttribution: jbrown commentedComment #3
jbrown CreditAttribution: jbrown commentedComment #4
droplet CreditAttribution: droplet commentedre-roll against head
Comment #5
Freso CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: moshe weitzman commentedlooks good.
Comment #9
Eric_A CreditAttribution: Eric_A commentedComment #10
webchickCommitted to HEAD. Thanks!