Function image_captcha_image(), that generates image captcha, calls exit() without running hook_exit(). This is obviously an unclean termination of Drupal script.

Comments

soxofaan’s picture

Hi,

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?

TonyK’s picture

I have created an issue in Drupal core for that: #1305814: hook_exit() description is misleading.

elachlan’s picture

Status: Active » Postponed (maintainer needs more info)

Waiting for documentation.

wundo’s picture

Issue summary: View changes
wundo’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)