Very similar to #2550497: Call to undefined function drupal_get_path_alias(), we've come across a situation where we're getting:
PHP Fatal error: Call to undefined function user_access() in /path/to/docroot/sites/all/modules/contrib/acquia_purge/acquia_purge.diagnostics.inc on line 396
...where the site is using acquia_purge_lateruntime and it looks like AP's hook_exit is being called from _drupal_bootstrap_page_cache where Drupal hasn't done a sufficiently full boostrap for the user_access function to be defined.
In this case, the access check is not particularly important (the code is just deciding which "find out more" link to use), so it should be quite simple to avoid this error if the function's not available.
Patch on the way.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | call_to_undefined_user_access-2630202-2.patch | 593 bytes | mcdruid |
Comments
Comment #2
mcdruid commentedSimple patch for 7.x-1.x
Comment #3
mcdruid commentedComment #4
nielsvm commentedThanks Drew!
Comment #6
jenlamptonThis fix has been merged since 2017. Any chance for a new release?