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)
This commit is contained in:
Jeremy Thomerson 2013-05-24 19:35:51 +00:00 committed by Sam Minnee
parent 71e348c7af
commit 071d5b6fa0

View File

@ -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);
}
}