1
votes


I have drupal module "MyMod"
in hook block i have:

case 'view':  
   switch ($delta) {  
   //other cases  
   case 6:  
                $block['cache']=BLOCK_NO_CACHE;  
                $blcok['subject']="";  
                $block['content'] = theme('rss_feeds',$blcok['subject']);  
                return $block;  
}

and in MyMod_theme:

function MyMod_theme(){
return array(
'rss_feeds' => array(
            'arguments' =>array('Subject' =>NULL),
        ),
);
}

and my themes_rss_feeds is:

function theme_rss_feeds(&$Subject){...}

now i am keep getting this error in admin/reports/event
Parameter 1 to theme_rss_feeds() expected to be a reference, value given in /var/www/staging/htdocs/includes/theme.inc on line 656
how to pass parameter by reference to this theme function??
Thanks for your help

1
function theme_rss_feeds($Subject){...}Nikit

1 Answers

1
votes

You can not. It is impossible.

However, you don't want that anyway. Instead, you want to remove the & from the function definition as suggested by Nikit.