Opened 7 years ago

Closed 7 years ago

Last modified 4 years ago

#1020 closed defect (fixed)

Filebrowser not showing up.

Reported by: robin.glauser Owned by: comvation
Priority: normal Milestone: Contrexx 3.0 SP2
Component: Upload Version: 3.0.0.1
Severity: normal Keywords: upload, filebrowser, Call-time, pass-by-reference
Cc:

Description

Fatal error: Call-time pass-by-reference has been removed in /core_modules/upload/lib/uploader.class.php on line 283

Fix: Remove & from &$response in $ret = call_user_func(array($this->callbackData[1],$this->callbackData[2]),$tempPath,$tempWebPath,$this->getData(), $this->uploadId, $fileInfos, &$response); on line 283 in File /core_modules/upload/lib/uploader.class.php

Why: There is no reference sign on a function call - only on function definitions. Function definitions alone are enough to correctly pass the argument by reference. As of PHP 5.3.0, you will get a warning saying that "call-time pass-by-reference" is deprecated when you use & in foo(&$a);.

For example, use:

Right way! function myFunc(&$arg) { } myFunc($var); Rather than:

Wrong way! function myFunc($arg) { } myFunc(&$arg);

http://stackoverflow.com/questions/8971261/php-5-4-call-time-pass-by-reference-easy-fix-available

Change History (3)

comment:1 Changed 7 years ago by robin.glauser

Error appears only in PHP 5.4.9

comment:2 Changed 7 years ago by thomas.daeppen

  • Milestone changed from unknown to Contrexx 3.0 SP2
  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.