From d1076d7c0e628532e3b4b356435fcb03b27758e9 Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Thu, 23 Apr 2015 10:48:18 -0500 Subject: [PATCH] oops: Avoid infinite recursion for database error logging --- include/class.osticket.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/class.osticket.php b/include/class.osticket.php index 75a247c10..2f0645397 100644 --- a/include/class.osticket.php +++ b/include/class.osticket.php @@ -270,6 +270,10 @@ class osTicket { $e->getTraceAsString()); $error .= nl2br("\n\n---- "._S('Backtrace')." ----\n".$bt); + // Prevent recursive loops through this code path + if (substr_count($bt, __FUNCTION__) > 1) + return; + return $this->log(LOG_ERR, $title, $error, $alert); } -- GitLab