From 3b22b0f2c981d0e75f98ea85261eb67858e10e22 Mon Sep 17 00:00:00 2001 From: Ben Roberts Date: Tue, 28 Jun 2011 20:06:24 +0100 Subject: [PATCH] Bug fix: Undefined index $values[9] RippingCluster_LogEntry overwrote base class field list, causing undefined index notices when the base class was explicitly used. --- source/lib/RippingCluster/LogEntry.class.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/source/lib/RippingCluster/LogEntry.class.php b/source/lib/RippingCluster/LogEntry.class.php index ce620fc..7ca54f0 100644 --- a/source/lib/RippingCluster/LogEntry.class.php +++ b/source/lib/RippingCluster/LogEntry.class.php @@ -4,8 +4,16 @@ class RippingCluster_LogEntry extends SihnonFramework_LogEntry { protected $job_id; + protected static $types; + public static function initialise() { - self::$types['job_id'] = 'int'; + // Copy the list of datatypes from the parent + // We can't modify it in place, else we'll break any logging done inside the SihnonFramework tree + // or other subclass trees. + static::$types = parent::$types; + + // Add the new data types for this subclass + static::$types['job_id'] = 'int'; } protected function __construct($level, $category, $ctime, $pid, $file, $line, $message, $job_id) {