mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR: Edit-case checking of data in ViewableData::$failover for better error message. (from r95560) (from r98090)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102582 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
8ec4c25be7
commit
72bb124951
@ -188,7 +188,8 @@ class ViewableData extends Object implements IteratorAggregate {
|
||||
*/
|
||||
public function defineMethods() {
|
||||
if($this->failover) {
|
||||
$this->addMethodsFrom('failover');
|
||||
if(is_object($this->failover)) $this->addMethodsFrom('failover');
|
||||
else user_error("ViewableData::\$failover set to a non-object", E_USER_WARNING);
|
||||
|
||||
if(isset($_REQUEST['debugfailover'])) {
|
||||
Debug::message("$this->class created with a failover class of {$this->failover->class}");
|
||||
|
Loading…
Reference in New Issue
Block a user