Posts: 120
Threads: 9
Joined: Oct 2011
2011-10-28, 04:29 PM
(2011-10-28, 04:23 PM)pavemen Wrote: no, you need to find the function listed and correct it as needed. the "reference check" needs an "&" before the variable
function myfunction($var)
becomes
function myfunction(&$var)
for the return code you need to find the variable being passed and add as the last line of the function (usually)
return $var
We will wait for the 1.6.5 running, or we can update already even if our forum is running 1.6.4 ?
Posts: 4,846
Threads: 180
Joined: May 2007
Reputation:
254
2011-10-28, 07:13 PM
For hooks in the first list:
Existing:
$plugins->add_hook("postbit", "my_postbit_modifier");
function my_postbit_modifier(&$post)
{
global $stuff;
//do things to modify $post or not
}
Change to:
$plugins->add_hook("postbit", "my_postbit_modifier");
function my_postbit_modifier($post)
{
global $stuff;
//do things to modify $post or not, BUT YOU NEED OT RETURN IT
return $post;
}
For hooks in the second list
Existing:
$plugins->add_hook("datahandler_post_insert_post", "my_post_modifier");
function my_post_modifier($post)
{
global $stuff;
//do things to modify $post
}
Change to:
$plugins->add_hook("datahandler_post_insert_post", "my_post_modifier");
function my_post_modifier(&$post)
{
global $stuff;
//do things to modify $post
}
Lost interest, sold my sites, will browse here once in a while. It's been fun.