]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/error.php
parse_url returns an associative array - not an object
[quix0rs-gnu-social.git] / lib / error.php
index 0c521db08124a29d77259ae3dfb25df5dadb0f49..87a4d913b41b1287f7af821926c5a8dea82a8439 100644 (file)
@@ -44,12 +44,13 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
  */
 class ErrorAction extends Action
 {
+    static $status = array();
+
     var $code    = null;
     var $message = null;
-    var $status  = null;
     var $default = null;
 
-    function __construct($message, $code, $output='php://output', $indent=true)
+    function __construct($message, $code, $output='php://output', $indent=null)
     {
         parent::__construct($output, $indent);
 
@@ -69,7 +70,7 @@ class ErrorAction extends Action
      */
     function extraHeaders()
     {
-        $status_string = $this->status[$this->code];
+        $status_string = @self::$status[$this->code];
         header('HTTP/1.1 '.$this->code.' '.$status_string);
     }
 
@@ -88,9 +89,10 @@ class ErrorAction extends Action
      *
      * @return page title
      */
+
     function title()
     {
-        return $this->message;
+        return @self::$status[$this->code];
     }
 
     function isReadOnly($args)