Hey there,
I'm new to RoundCube plugin development. We're using RC version 0.8.5.
I wrote a little plugin to get used to and experiment with the system.
Now I'm stuck with the messages_list hook.
Example code:
<?php
class my_plugin_test extends rcube_plugin {
function init() {
// ...
$this->add_hook('messages_list', array($this, 'parse_messages'));
}
function parse_messages($arg) {
// Server Error
//var_dump($arg);
/*
// Works
$v = $arg['messages'];
// ... but now Server Error
var_dump($v);
*/
// Server Error
foreach($arg['messages'] as $message) {
var_dump($message);
}
return $arg;
}
// ...
}
?>
As soon as I try to access the contents of the $arg-array I get a "Server Error! (OK)" message:
I'm stuck at this for quite a while and can't find any solution.
When I remove any contents of the function and just keep "return $args" it works normally. But as soon as I try to do anything with the $args-array I get this error message.
What am I doing wrong?
Thanks for your help!