Currently, preload item methods are called as static methods only but the following change will
allow them to be called as instance methods as well without breaking compatiblity.
htdocs/class/preload.php on line 118
$event= array('class_name' => $class_name, 'method' => $method);
change the above line to
$event= array('class_name' => new $class_name, 'method' => $method);
Using 2.4.5RC2
Oops, didn't realize 2.4 still supports PHP4.
Here is the one for both PHP4/5.
htdocs/class/preload.php on line 118:
$event= array('class_name' => new $class_name, 'method' => $method);
to
$obj = new $class;
$event= array('class_name' => &$obj, 'method' => $method);
on line 139 of the same file:
call_user_func(array($event['class_name'], $event['method']), $args);
to
call_user_func($event, $args);
Haven't tested yet with PHP4, but hope this should work fine.
Also any reason why using call_user_func() instead of call_user_func_array() when triggering events?
OK, I'll take care of this one personally.