This one is simple; never call exit() but let pages flow naturally. Calling exit() may prevent cache generation and may break code tests.

See also this thread: #592664: function calls should end naturally (avoid exit calls)

CommentFileSizeAuthor
#2 dont_use_exit-2623010-2.patch293 bytesmrharolda

Comments

MrHaroldA created an issue. See original summary.

mrharolda’s picture

Status: Active » Needs review
StatusFileSize
new293 bytes
colemanw’s picture

Status: Needs review » Fixed

Looks good.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

michaelfavia’s picture

I believe this is incorrect. I'd like to suggest using drupal_exit() instead. We're running into issues with the callback echoing out the JSON as intended but then also appending the maintenance page as well. Invoking drupal_exit() to tear down the session, etc is the appropriate action here I think as we want to short circuit the return of a fully rendered drupal page. The result still cacheable. Thoughts?