Error: Cannot pass parameter 2 by reference

I need help on php scripting, the script is the plugin of my CMS, and the developer no longer maintained the script…http://wakka.xiffy.nl/gallery

I see following error on the server log:
[13-Mar-2015 01:41:40 America/New_York] PHP Fatal error: Cannot pass parameter 2 by reference in /home/myweb/public_html/nucleus/plugins/gallery/admin.php on line 22

Following is the Line 22 for the admin.php
$manager->notify(‘NPgAdminTab’, array(‘tabs’ => &$this->tabs ));

This is the “reference”

&$this->tabs 

It’s hard to see why a notify function would need to pass by reference.

I can’t see what your code does, or why you need to pass as a reference, but if you want to try guess and check, you can always try these options:

$manager->notify('NPgAdminTab', array('tabs' => $this->tabs ));

or

$arr = array('tabs' => &$this->tabs);
$manager->notify('NPgAdminTab', $arr);

or

$arr = array('tabs' => &$this->tabs);
$manager->notify('NPgAdminTab', &$arr);

Otherwise, we’d need to know what the function does.

Sponsor our Newsletter | Privacy Policy | Terms of Service