Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authordiosmosis <benaka@piwik.pro>2014-10-31 17:02:58 +0300
committerdiosmosis <benaka@piwik.pro>2014-10-31 17:02:58 +0300
commita7452975f88e72229f071921a1951d9786fc4b7b (patch)
tree3cf63a395b9e8ce1d1b36315fb7fe6028e6bff04 /core
parent00ccddc3c4a3a9c454cacd6596878eef07867ff0 (diff)
Revert "Use interface to determine if an exception contains HTML message content."
This reverts commit 8e274dd6b36989dd7b20a3e2b17a5d2cf1db7107.
Diffstat (limited to 'core')
-rw-r--r--core/Exceptions/HtmlMessageException.php12
-rw-r--r--core/Exceptions/HtmlMessageExceptionInterface.php20
-rw-r--r--core/FrontController.php5
3 files changed, 12 insertions, 25 deletions
diff --git a/core/Exceptions/HtmlMessageException.php b/core/Exceptions/HtmlMessageException.php
index 69f809e1e0..243a0f1726 100644
--- a/core/Exceptions/HtmlMessageException.php
+++ b/core/Exceptions/HtmlMessageException.php
@@ -16,7 +16,15 @@ use Exception;
*
* @api
*/
-class HtmlMessageException extends Exception implements HtmlMessageExceptionInterface
+class HtmlMessageException extends Exception
{
- // empty
+ /**
+ * Returns the exception message.
+ *
+ * @return string
+ */
+ public function getHtmlMessage()
+ {
+ return $this->getMessage();
+ }
} \ No newline at end of file
diff --git a/core/Exceptions/HtmlMessageExceptionInterface.php b/core/Exceptions/HtmlMessageExceptionInterface.php
deleted file mode 100644
index b96c2e0a84..0000000000
--- a/core/Exceptions/HtmlMessageExceptionInterface.php
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-/**
- * Piwik - free/libre analytics platform
- *
- * @link http://piwik.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- *
- */
-namespace Piwik\Exceptions;
-
-/**
- * Exceptions that implement this interface are assumed to have HTML content
- * in their messages.
- *
- * @api
- */
-interface HtmlMessageExceptionInterface
-{
- // empty
-} \ No newline at end of file
diff --git a/core/FrontController.php b/core/FrontController.php
index 33dab49e47..0fa143d4b6 100644
--- a/core/FrontController.php
+++ b/core/FrontController.php
@@ -13,7 +13,6 @@ use Exception;
use Piwik\API\Request;
use Piwik\API\ResponseBuilder;
use Piwik\Exceptions\HtmlMessageException;
-use Piwik\Exceptions\HtmlMessageExceptionInterface;
use Piwik\Http\Router;
use Piwik\Plugin\Controller;
use Piwik\Plugin\Report;
@@ -614,8 +613,8 @@ class FrontController extends Singleton
{
$debugTrace = $ex->getTraceAsString();
- if ($ex instanceof HtmlMessageExceptionInterface) {
- $message = $ex->getMessage();
+ if (method_exists($ex, 'getHtmlMessage')) {
+ $message = $ex->getHtmlMessage();
} else {
$message = Common::sanitizeInputValue($ex->getMessage());
}