Changed getMessage() to _getMessage()
authorAlexander Ebert <ebert@woltlab.com>
Fri, 4 Nov 2011 14:02:32 +0000 (15:02 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 4 Nov 2011 14:02:32 +0000 (15:02 +0100)
Some retard at PHP thought it may be clever to define getMessage() as final for no reason.

wcfsetup/install/files/lib/system/exception/AJAXException.class.php
wcfsetup/install/files/lib/system/exception/LoggedException.class.php
wcfsetup/install/files/lib/system/exception/NamedUserException.class.php
wcfsetup/install/files/lib/system/exception/SystemException.class.php
wcfsetup/install/files/lib/system/exception/UserException.class.php

index 3dd6ea23058737e191249f871cfd4f5b3dc8afcc..92a459755abeca74438b44c18e352a4bc3a93403 100644 (file)
@@ -30,7 +30,7 @@ class AJAXException extends LoggedException {
                }
                else {
                        $responseData = array(
-                               'message' => $this->getMessage()
+                               'message' => $this->_getMessage()
                        );
                }
                
index 053de2ca23652b3d876c6b7b6efb959d1018d573..6c06b2c846c0361aaa105d7a378a65334fe07b77 100644 (file)
@@ -20,9 +20,9 @@ class LoggedExceptions extends \Exception {
         * @param       boolean         $raw
         * @see         \Exception::getMessage()
         */
-       public function getMessage($raw = false) {
+       public function _getMessage($raw = false) {
                if ($raw) {
-                       return parent::getMessage();
+                       return $this->getMessage();
                }
                
                return 'An error occured. Sorry.';
index e77d12509030a555dc03e2cdad1a42722070fa4c..76058eb660c97523a8f8f6e159ed4a9057943162 100644 (file)
@@ -30,7 +30,7 @@ class NamedUserException extends UserException {
                        'name' => get_class($this),
                        'file' => $this->getFile(),
                        'line' => $this->getLine(),
-                       'message' => $this->getMessage(),
+                       'message' => $this->_getMessage(),
                        'stacktrace' => $this->getTraceAsString()
                ));
                WCF::getTPL()->display('userException');
index 584ce62f95fe346f534561e4ab39ddac3ce07498..312c2469966448f232dbc94593a33fa0d345191f 100644 (file)
@@ -80,7 +80,7 @@ class SystemException extends LoggedException implements IPrintableException {
                <!DOCTYPE html>
                <html>
                        <head>
-                               <title>Fatal error: <?php echo StringUtil::encodeHTML($this->getMessage()); ?></title>
+                               <title>Fatal error: <?php echo StringUtil::encodeHTML($this->_getMessage()); ?></title>
                                <style>
                                        .systemException {
                                                font-family: 'Trebuchet MS', Arial, sans-serif !important;
@@ -139,7 +139,7 @@ class SystemException extends LoggedException implements IPrintableException {
                        </head>
                        <body>
                                <div class="systemException">
-                                       <h1>Fatal error: <?php echo StringUtil::encodeHTML($this->getMessage()); ?></h1>
+                                       <h1>Fatal error: <?php echo StringUtil::encodeHTML($this->_getMessage()); ?></h1>
                                        
                                        <?php if (DEBUG_MODE == 'debug') { ?>
                                                <div>
@@ -147,7 +147,7 @@ class SystemException extends LoggedException implements IPrintableException {
                                                
                                                        <h2>Information:</h2>
                                                        <p>
-                                                               <b>error message:</b> <?php echo StringUtil::encodeHTML($this->getMessage()); ?><br>
+                                                               <b>error message:</b> <?php echo StringUtil::encodeHTML($this->_getMessage()); ?><br>
                                                                <b>error code:</b> <?php echo intval($this->getCode()); ?><br>
                                                                <?php echo $this->information; ?>
                                                                <b>file:</b> <?php echo StringUtil::encodeHTML($this->getFile()); ?> (<?php echo $this->getLine(); ?>)<br>
index 96600bbe9df47a100c15e2ce8a13113bf0be0a75..b4de6d89be730329e89d22c2010e1dfb7ad4f53a 100644 (file)
@@ -20,7 +20,7 @@ abstract class UserException extends LoggedException implements IPrintableExcept
                        echo '<pre>' . $this->getTraceAsString() . '</pre>';
                }
                else {
-                       echo '<pre>' . $this->getMessage() . '</pre>';
+                       echo '<pre>' . $this->_getMessage() . '</pre>';
                }
        }
 }