Opened 8 years ago

Closed 8 years ago

Last modified 5 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:
Severity: normal Keywords: upload, filebrowser, Call-time, pass-by-reference


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);

Change History (3)

comment:1 Changed 8 years ago by robin.glauser

Error appears only in PHP 5.4.9

comment:2 Changed 8 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.