From 071d5b6fa01531ac9a4c378b4c14d70fd2178c29 Mon Sep 17 00:00:00 2001 From: Jeremy Thomerson Date: Fri, 24 May 2013 19:35:51 +0000 Subject: [PATCH] FIX: error message doesn't always include class name When a method was not found on UnsavedRelationList I was getting the following error: Object->__call(): the method 'nameOfMethod' does not exist on '' (nameOfMethod has been replaced here since it was a method I added via an extension) --- core/Object.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/Object.php b/core/Object.php index 52aae3c17..3c5480a47 100755 --- a/core/Object.php +++ b/core/Object.php @@ -746,8 +746,8 @@ abstract class Object { } } else { // Please do not change the exception code number below. - - throw new Exception("Object->__call(): the method '$method' does not exist on '$this->class'", 2175); + $class = get_class($this); + throw new Exception("Object->__call(): the method '$method' does not exist on '$class'", 2175); } }