]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix "Only variables should be passed by reference" in stable7 template
authorJoas Schilling <nickvergessen@owncloud.com>
Mon, 2 Mar 2015 13:29:41 +0000 (14:29 +0100)
committerJoas Schilling <nickvergessen@owncloud.com>
Mon, 2 Mar 2015 13:31:38 +0000 (14:31 +0100)
lib/private/template.php

index 983c0e3628d125de2965cface832568ffc1e8af1..4acbe4d119519a87e5c474abf8ce2ce6f4d91fb8 100644 (file)
@@ -269,14 +269,17 @@ class OC_Template extends \OC\Template\Base {
                        while (method_exists($exception, 'previous') && $exception = $exception->previous()) {
                                $error_msg .= '<br/>Caused by:' . ' ';
                                if ($exception->getCode()) {
-                                       $error_msg .= '['.OC_Util::sanitizeHTML($exception->getCode()).'] ';
+                                       $code = $exception->getCode();
+                                       $error_msg .= '['.OC_Util::sanitizeHTML($code).'] ';
                                }
-                               $error_msg .= OC_Util::sanitizeHTML($exception->getMessage());
+                               $message = $exception->getMessage();
+                               $error_msg .= OC_Util::sanitizeHTML($message);
                        };
                } else {
                        $hint = '';
                        if ($exception instanceof \OC\HintException) {
-                               $hint = OC_Util::sanitizeHTML($exception->getHint());
+                               $hint = $exception->getHint();
+                               $hint = OC_Util::sanitizeHTML($hint);
                        }
                }
                self::printErrorPage($error_msg, $hint);