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.
Function image_captcha_image(), that generates image captcha, calls exit() without running hook_exit(). This is obviously an unclean termination of Drupal script.
Comments
Comment #1
soxofaan CreditAttribution: soxofaan commentedHi,
I've just went through the drupal core code and modules and found quite a bit of places where exit() was used, but none of them were preceded with a hook_exit() trigger (except page caching handling in bootstrap.inc). For example:
upload module (for json responses)
system module (for phpinfo page)
openId module (for redirects)
book module (for json responses)
I also found some instances in file.inc and xmlrpcs.inc.
So, I'm not sure that not calling
module_invoke_all('exit');
is actually unclean termination.Do you have documentation or guidelines about this?
Comment #2
TonyK CreditAttribution: TonyK commentedI have created an issue in Drupal core for that: #1305814: hook_exit() description is misleading.
Comment #3
elachlan CreditAttribution: elachlan commentedWaiting for documentation.
Comment #4
wundo CreditAttribution: wundo at Chuva Inc. for Chuva Inc. commentedComment #5
wundo CreditAttribution: wundo at Chuva Inc. for Chuva Inc. commented