Bug Report #4048

Log writer fails when messages use Log::ALERT

Added by Mathew Davies over 3 years ago. Updated over 3 years ago.

Status:ClosedStart date:06/15/2011
Priority:NormalDue date:
Assignee:Kiall Mac Innes% Done:

100%

Category:Core
Target version:v3.1.4
Resolution:fixed Points:

Description

If you have a line like this:

Kohana::$log->add(Log::ALERT, Kohana_Exception::text($e));

it'll fail with the following error:

ErrorException [ 8 ]: Undefined offset: 1 ~ SYSPATH/classes/kohana/log/file.php [ 91 ]

The reason and fix is simple; LOG_ALERT is not in the $_log_levels array in the writer class: https://github.com/kohana/core/blob/3.1%2Fmaster/classes/kohana/log/writer.php#L17

Associated revisions

Revision ca203c06
Added by thepixeldeveloper - over 3 years ago

Fixes #4048 - Log writer fails when messages use Log::ALERT

History

#2 Updated by Jeremy Bush over 3 years ago

  • Target version set to v3.1.4

#3 Updated by Kiall Mac Innes over 3 years ago

  • Status changed from New to Assigned
  • Assignee set to Kiall Mac Innes
  • % Done changed from 0 to 100
  • Resolution set to fixed

#4 Updated by thepixeldeveloper - over 3 years ago

  • Status changed from Assigned to Closed

Applied in changeset commit:ca203c065db0de6620a56f1e4bade311e1ff592a.

Also available in: Atom PDF