[Cs-content-commits] SF.net SVN: cs-content:[483] trunk/1.0/contentSystem.class.php
PHP Templating & Includes System
Brought to you by:
crazedsanity
From: <cra...@us...> - 2010-08-12 15:10:29
|
Revision: 483 http://cs-content.svn.sourceforge.net/cs-content/?rev=483&view=rev Author: crazedsanity Date: 2010-08-12 15:10:22 +0000 (Thu, 12 Aug 2010) Log Message: ----------- Minor CLI-based fix. /contentSystem.class.php: * die_gracefully(): -- don't check SERVER_PROTOCOL right away. -- only set header if SERVER_PROTOCOL is found. Modified Paths: -------------- trunk/1.0/contentSystem.class.php Modified: trunk/1.0/contentSystem.class.php =================================================================== --- trunk/1.0/contentSystem.class.php 2010-08-12 15:06:07 UTC (rev 482) +++ trunk/1.0/contentSystem.class.php 2010-08-12 15:10:22 UTC (rev 483) @@ -740,8 +740,10 @@ * Called when something is broken. */ private function die_gracefully($details=NULL) { - if(isset($_SERVER['SERVER_PROTOCOL']) && $this->templateObj->template_file_exists('system/404.shared.tmpl')) { - header('HTTP/1.0 404 Not Found'); + if($this->templateObj->template_file_exists('system/404.shared.tmpl')) { + if(isset($_SERVER['SERVER_PROTOCOL'])) { + header('HTTP/1.0 404 Not Found'); + } //Simple "Page Not Found" error... show 'em. $this->templateObj->add_template_var('main', $this->templateObj->file_to_string('system/404.shared.tmpl')); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |