From ca5b3d1480ece90b25513f3e63962f5489145bd6 Mon Sep 17 00:00:00 2001 From: eileen Date: Mon, 22 Mar 2021 12:19:47 +1300 Subject: [PATCH] Fix loop It turns out that if you 'break' advanced search (in my case I applied a patch that caused invalid sql) it enters a loop. I really can't see why 'while' would have ever made sense here. There is nothing to cause it to 'move along' --- CRM/Core/Error.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Core/Error.php b/CRM/Core/Error.php index 0d15f3006e..6c44df6261 100644 --- a/CRM/Core/Error.php +++ b/CRM/Core/Error.php @@ -829,7 +829,7 @@ class CRM_Core_Error extends PEAR_ErrorStack { // Exception backtrace if ($e instanceof PEAR_Exception) { $ei = $e; - while (is_callable([$ei, 'getCause'])) { + if (is_callable([$ei, 'getCause'])) { // DB_ERROR doesn't have a getCause but does have a __call function which tricks is_callable. if (!$ei instanceof DB_Error) { if ($ei->getCause() instanceof PEAR_Error) { -- 2.25.1