]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/erroraction.php
[XML/HTML Outputter] General improvements and refactoring as well as some bug fixes
[quix0rs-gnu-social.git] / lib / erroraction.php
index 03a1960c620bdc124836e16f276426b2f210185f..20ab200779ed6a5e201bd16b57b69f2c7d6c9a1f 100644 (file)
@@ -44,7 +44,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
  */
 class ErrorAction extends InfoAction
 {
-    static $status = array();
+    static $status = [];
 
     var $code    = null;
     var $message = null;
@@ -86,11 +86,11 @@ class ErrorAction extends InfoAction
     /**
      * Display content.
      *
-     * @return nothing
+     * @return void
      */
     function showContent()
     {
-        $this->element('div', array('class' => 'error'), $this->message);
+        $this->element('div', ['class' => 'error'], $this->message);
     }
 
     function showNoticeForm()
@@ -102,20 +102,19 @@ class ErrorAction extends InfoAction
      *
      * Goes back to the browser, where it's shown in a popup.
      *
-     * @param string $msg Message to show
-     *
      * @return void
+     * @throws ClientException
      */
 
     function ajaxErrorMsg()
     {
-        $this->startHTML('text/xml;charset=utf-8', true);
+        $this->startHTML('text/xml;charset=utf-8');
         $this->elementStart('head');
         // TRANS: Page title after an AJAX error occurs on the send notice page.
         $this->element('title', null, _('Ajax Error'));
         $this->elementEnd('head');
         $this->elementStart('body');
-        $this->element('p', array('id' => 'error'), $this->message);
+        $this->element('p', ['id' => 'error'], $this->message);
         $this->elementEnd('body');
         $this->endHTML();
     }