I'm tried to set database config system. I attach new database config, load group and try get field value:
Kohana::$config->attach(new Config_Database);
$config = Kohana::$config->load('site');
$value = $config->get('title');
echo Debug::vars($value);
But i get only an error:
ErrorException [ Notice ]: unserialize(): Error at offset 0 of 16 bytes MODPATH\database\classes\Kohana\Config\Database\Reader.php [ 64 ]
Config table structure:
CREATE TABLE IF NOT EXISTS `config` (
`group_name` varchar(128) NOT NULL DEFAULT '',
`config_key` varchar(128) NOT NULL DEFAULT '',
`config_value` text,
PRIMARY KEY (`group_name`,`config_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `config` (`group_name`, `config_key`, `config_value`) VALUES
('site', 'description', 'Description'),
('site', 'title', 'Test title');
Tell me please, what wrong?