From 31f7afe56adf8cae80b31d5a94cd37fc857bef9d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= <jfd@butonic.de>
Date: Thu, 13 Jun 2013 13:14:00 +0200
Subject: [PATCH] PDOException has no previous(), oh the consistency ...

---
 lib/template.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/template.php b/lib/template.php
index 01f0fc28b6..ae9ea18744 100644
--- a/lib/template.php
+++ b/lib/template.php
@@ -547,7 +547,7 @@ class OC_Template{
 			$error_msg = '['.$exception->getCode().'] '.$error_msg;
 		}
 		$hint = $exception->getTraceAsString();
-		while ($exception = $exception->previous()) {
+		while (method_exists($exception,'previous') && $exception = $exception->previous()) {
 			$error_msg .= '<br/>Caused by: ';
 			if ($exception->getCode()) {
 				$error_msg .= '['.$exception->getCode().'] ';
-- 
GitLab