]> git.andy128k.dev Git - ipf.git/commitdiff
suppress notice when rendering 404 page
authorAndrey Kutejko <andy128k@gmail.com>
Sun, 15 Jul 2012 19:07:17 +0000 (22:07 +0300)
committerAndrey Kutejko <andy128k@gmail.com>
Sun, 15 Jul 2012 19:07:17 +0000 (22:07 +0300)
ipf/http/response/notfound.php

index f965ab2b9ea751651957479fac4aba1bf38151d1..1383cb6bfb5eeb3993f27215670502bdaa763aed 100644 (file)
@@ -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;
     }
 }
+