diff --git a/lib/model/channel.php b/lib/model/channel.php index cb040d8..ddf998a 100644 --- a/lib/model/channel.php +++ b/lib/model/channel.php @@ -154,7 +154,7 @@ abstract class Channel extends DatabaseObject implements ChannelInterface { final static protected function factory($object) { $rc = new ReflectionClass($object['type']); if (!$rc->isSubclassOf('Channel')) { - throw new InvalidArgumentException('\'' . $object['type'] . '\' is not a valid channel type'); + throw new InvalidArgumentException('\'' . $rc->getName() . '\' is not a valid channel type'); } return $rc->newInstanceArgs(array($object)); diff --git a/lib/model/database.php b/lib/model/database.php index b151d71..b234a90 100644 --- a/lib/model/database.php +++ b/lib/model/database.php @@ -196,7 +196,7 @@ abstract class Database implements DatabaseInterface { $rc = new ReflectionClass($config['db']['backend']); if (!$rc->isSubclassOf('Database')) { - throw new InvalidArgumentException('\'' . $result['type'] . '\' is not a valid database backend'); + throw new InvalidArgumentException('\'' . $rc->getName() . '\' is not a valid database backend'); } self::$connection = $rc->newInstanceArgs(array($config['db']));