Permalink
Browse files

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)
  • Loading branch information...
1 parent 71e348c commit 071d5b6fa01531ac9a4c378b4c14d70fd2178c29 @jthomerson jthomerson committed with sminnee May 24, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 core/Object.php
View
@@ -746,8 +746,8 @@ public function __call($method, $arguments) {
}
} 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);
}
}

0 comments on commit 071d5b6

Please sign in to comment.