CodeIgniter Forums
Is calling exit() after show_error() necessary? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Is calling exit() after show_error() necessary? (/showthread.php?tid=53543)



Is calling exit() after show_error() necessary? - El Forum - 07-28-2012

[eluser]Unknown[/eluser]
I want to be sure no successive lines of code are called if a conditional is met that triggers show_error(). Does this halt script execution or should I place exit() or die() after to be certain?


Is calling exit() after show_error() necessary? - El Forum - 07-30-2012

[eluser]Aken[/eluser]
show_error() and show_404() both contain exit() calls already. You can do it if it makes you feel better, but it's not necessary.


Is calling exit() after show_error() necessary? - El Forum - 07-30-2012

[eluser]Unknown[/eluser]
I thought so but I couldn't find those call in the CI source. It uses output buffering to display the formatted error message and beyond that I could determine any call to exit(). Thanks for the clarification.


Is calling exit() after show_error() necessary? - El Forum - 07-30-2012

[eluser]Aken[/eluser]
Those functions are in /system/core/Common.php