Thu 15th Sep '05 5:13am
|
|
|
|
ImpEx 1.74 "Only variables can be passed by reference" error in ImpexData.php
I'm running PHP 5.0.5, vBulletin 3.0.9, ImpEx 1.74. When on "003 Import User Groups and Ranks", I got the following error:
Fatal error: Only variables can be passed by reference in /xxxxxxxxxx/ImpExData.php on line 159
I fixed it by changing the code from:
PHP Code:
function ImpExData(&$Db_object, &$sessionobject, $type)
{
$this->_datatype=$type;
$this->_values = $this->create_data_type(
$Db_object,
$sessionobject->get_session_var('targetdatabasetype'),
$sessionobject->get_session_var('targettableprefix'),
$type
);
To:
PHP Code:
function ImpExData(&$Db_object, &$sessionobject, $type)
{
$targetdatabasetype = $sessionobject->get_session_var('targetdatabasetype');
$targettableprefix = $sessionobject->get_session_var('targettableprefix');
$this->_datatype=$type;
$this->_values = $this->create_data_type(
$Db_object,
$targetdatabasetype,
$targettableprefix,
$type
);
I just wanted to share this in case anyone else has the same problem, and as a bugfix suggestion for future releases.
|