When I try to post content of any node type while the Upload module is activated, I get the following error.

Fatal error: Only variables can be passed by reference in /var/vhosts/lolminute.com/httpdocs/modules/upload/upload.module on line 380

Comments

ChrisKennedy’s picture

Version: 5.0-beta2 » 5.x-dev
Status: Active » Needs review
StatusFileSize
new1.31 KB

Here is the problem commit: http://cvs.drupal.org/viewcvs/drupal/drupal/modules/upload/upload.module...

And the parent issue: http://drupal.org/node/98391

The attached patch should fix the problem by creating variables that can then be passed by reference to file_check_directory().

RobRoy’s picture

Status: Needs review » Needs work

Good catch. One minor thing. I'd throw a break and a comment above those two lines instead of the two inline comments like this:

// Create variables for the default 'files' and temp directories to be passed by reference.

ChrisKennedy’s picture

Status: Needs work » Needs review
StatusFileSize
new1.36 KB

Sounds good to me.

RobRoy’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new1.36 KB

Deleted one trailing white-space after the comment. Looks RTBC.

neclimdul’s picture

The break makes it look like the first comment isn't attached to any code. -1
Code works though. Everything seems to be in order.

Steven’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD. Thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)