Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
documentation
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
7 Aug 2012 at 09:26 UTC
Updated:
4 Jan 2014 at 02:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
heine commentedIf nothing breaks when you print, the "MUST" is a bit too strong. This hook can't send anything to the browser?
Comment #2
jhodgdonI think this change is good -- the hook docs already said you can't print, and this just clarifies why... but that is a good question. What does "already sent to the browser" mean really? I thought the output would only be sent to the browser when exit() is called in the PHP code?
Comment #3
chx commentedOutput is also sent on flush(). While D6 and D7 core does not flush, D8 does and a contrib might earlier. Also, FPM has fastcgi_finish_request command which (surprise!) finishes the request :) ie closes the output and D8 calls that if it can.
Comment #4
jhodgdonGood point. I think this patch is a good idea then. I'll leave it for a few days at RTBC before I do any committing of it though (which might turn into a week if one of the other committers doesn't grab it, as I'm traveling)... just in case there are dissenting opinions.
Comment #5
catchYep fair enough. Committed/pushed to 8x, moving to 7.x for backport.
Comment #6
chx commentedIt applied with -p2 just fine.
Comment #7
chx commentedOh and it's 7.x
Comment #8
webchickCommitted and pushed to 7.x. Thanks!
One more time. :)
Comment #9
webchickx
Comment #10
mdupontCurrent D6 documentation says: "It is often used for page logging and printing out debugging information.". So, under D6 can we print in hook_exit()?
Comment #11
chx commentedI am not 100% whether enhancing D6 documentation is anyone's priority at this stage. Nor I believe that committing this would make anyone change their code and finally I have no idea what to do under D6 instead of hook_exit.