It's a Kohana 3.3 version bug. Check here for more detials.
Kohana ErrorException [ 8 ]
Вопрос
After installing and configuring Kohana, I renamed the install.php file (according to the user guide). But when I now go to localhost/kohana, I get the following error:
ErrorException [ 8 ]: Array to string conversion ~ SYSPATH/classes/Kohana/Log/Writer.php [ 81 ]
I couldn't find a solution elsewhere on the web. Does anyone have any ideas how this can be fixed? Thanks!
Решение
Другие советы
This is hotfix for that bug. Hope this help someones else https://github.com/kohana/core/commit/82b470b2827470da37b0e6771b77c369c3d2e5fb
classes/Kohana/Log/Writer.php
public function format_message(array $message, $format = "time --- level: body in file:line")
{
$message['time'] = Date::formatted_time('@'.$message['time'], Log_Writer::$timestamp, Log_Writer::$timezone, TRUE);
$message['level'] = $this->_log_levels[$message['level']];
- // FIX: $message should consist of an array of strings
- $message = array_filter($message, 'is_string');
-
- $string = strtr($format, $message);
+ $string = strtr($format, array_filter($message, 'is_scalar'));
if (isset($message['additional']['exception']))
{
$message['body'] = $message['additional']['exception']->getTraceAsString();
$message['level'] = $this->_log_levels[Log_Writer::$strace_level];
- $string .= PHP_EOL.strtr($format, $message);
+ $string .= PHP_EOL.strtr($format, array_filter($message, 'is_scalar'));
}
return $string;
Noticed that '+' means line added, '-' means line removed from v3.3
Не связан с StackOverflow