I've installed the module Download as well as the PclZip-library. I've created a custom content type with multiple uploaded files (images as well as other type of files) and the field "Download all files".

If there are files in the content that is created and the Download files is set to the correct Field set, a link shows up as expected in the created content. When clicking that link in the created content though, i get the following error:

Strict warning: Only variables should be passed by reference in download_download() (line 256 of SENSORED MY FILEPATH HERE/drupal/htdocs/sites/all/modules/download/download.module).

Can anyone help me figure out whether this is a bad configuration by me or an error in the Download-module? And how to fix it of course :)

Comments

jeffam’s picture

Component: User interface » Code
Issue tags: -critical
StatusFileSize
new484 bytes

It's just a PHP warning, and everything works fine despite it, but here's a patch that prevents the error.

jeffam’s picture

Status: Active » Needs review
berglund.mikael’s picture

Thank you Jeffam, it seems to work. When I click on the link now though, it ends up just reloading the Node. The actual URL that the link points to does not seem to correspond to the file path or name, might the link be wrongly configured? Thanks!

daniel-san’s picture

I just started trying out this module and I was getting the same warning and result as comment #3.

Renaming the pclzip folder from "pclzip-2-8-2" to "pclzip" resolved the issue and allowed the download to work.

Hope this helps.

Dan

andrezstar’s picture

#1 patch worked :)

But i was wondering if you have the same issue than me.
The display of the "Dowload these files" FIELD for me does not display a text inside the LINK element.

So it shows like:

insted of for instance:
DOWNLOAD ALL FILES

Edit: OK I just didnt filled the right Info :)

interdruper’s picture

Status: Needs review » Reviewed & tested by the community

#1 fixes the warning. It is just a strict warning at debug level, not critical at all.

hgoto’s picture

Title: Error: Critical warning: Only variables.. » Strict warning: Only variables should be passed by reference in download_download()

As interdruper told, this is just a strict warning. And I agree with the patch #1 works well.

Steps to reproduce the problem:

  1. Install the library and module.
  2. Create a file field and download field in a content type.
  3. Create a content with a image with a link title.
  4. You can see the download link. Click it.
  5. Reload the page and you can see the warning message.

I'd be happy if this is committed :)

giupenni’s picture

#1 fixes the problem

cockers’s picture

#1 fixes for me too. Can this be committed?

gagarine’s picture

Status: Reviewed & tested by the community » Closed (outdated)

I'm closing all the D7 related bugs. If there is still a real demand, please reopen.