From 13892417c45156f9546d70ac97882b5812e24f58 Mon Sep 17 00:00:00 2001
From: Joas Schilling <nickvergessen@owncloud.com>
Date: Wed, 1 Jun 2016 13:34:57 +0200
Subject: [PATCH] Do not show the hint when it's the same as the message

---
 lib/private/legacy/template.php | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/private/legacy/template.php b/lib/private/legacy/template.php
index ce3b3dba38d..5023e3a60c8 100644
--- a/lib/private/legacy/template.php
+++ b/lib/private/legacy/template.php
@@ -316,6 +316,11 @@ class OC_Template extends \OC\Template\Base {
 		* @param string $hint An optional hint message - needs to be properly escaped
 		*/
 	public static function printErrorPage( $error_msg, $hint = '' ) {
+		if ($error_msg === $hint) {
+			// If the hint is the same as the message there is no need to display it twice.
+			$hint = '';
+		}
+
 		try {
 			$content = new \OC_Template( '', 'error', 'error', false );
 			$errors = array(array('error' => $error_msg, 'hint' => $hint));
-- 
GitLab