From 22c6efeafde0e0dbb8771296306e9f78a5b3e276 Mon Sep 17 00:00:00 2001
From: Peter Rotich <peter@osticket.com>
Date: Mon, 20 Jan 2014 23:48:07 +0000
Subject: [PATCH] Do variable lookup if delegated classes returns empty on
 thurder calls.

---
 include/class.client.php | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/class.client.php b/include/class.client.php
index e9567c68f..2202abeff 100644
--- a/include/class.client.php
+++ b/include/class.client.php
@@ -26,11 +26,14 @@ abstract class TicketUser {
     function __call($name, $args) {
         global $cfg;
 
+        $rv = null;
         if($this->user && is_callable(array($this->user, $name)))
-            return  $args
+            $rv = $args
                 ? call_user_func_array(array($this->user, $name), $args)
                 : call_user_func(array($this->user, $name));
 
+        if ($rv) return $rv;
+
         $tag =  substr($name, 3);
         switch (strtolower($tag)) {
             case 'ticket_link':
-- 
GitLab