From bf6c9ddb922cdbb9e56ec80fde6b9e81c76c1273 Mon Sep 17 00:00:00 2001 From: Andrey Kutejko Date: Sun, 15 Jul 2012 22:07:17 +0300 Subject: [PATCH] suppress notice when rendering 404 page --- ipf/http/response/notfound.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/ipf/http/response/notfound.php b/ipf/http/response/notfound.php index f965ab2..1383cb6 100644 --- a/ipf/http/response/notfound.php +++ b/ipf/http/response/notfound.php @@ -4,16 +4,21 @@ class IPF_HTTP_Response_NotFound extends IPF_HTTP_Response { function __construct($content='404 Not Found', $mimetype=null) { - try{ + try + { $context = array( - 'title'=>'404 Not Found', - 'query_string'=>$_SERVER['QUERY_STRING'], - 'MEDIA_URL'=>IPF::get('media_url'), - 'ADMIN_MEDIA_URL'=>IPF::get('admin_media_url'), + 'title' => '404 Not Found', + 'query_string' => @$_SERVER['QUERY_STRING'], + 'MEDIA_URL' => IPF::get('media_url'), + 'ADMIN_MEDIA_URL' => IPF::get('admin_media_url'), ); $content = IPF_Shortcuts::RenderToString('404.html', $context); - }catch(IPF_Exception $e){} + } + catch (IPF_Exception $e) + { + } parent::__construct($content, $mimetype); $this->status_code = 404; } } + -- 2.49.0