Clicking a download link produces the following error:

Recoverable fatal error: Argument 1 passed to pubdlcnt_is_valid_file_url() must be an instance of string, string given, called in /sites/all/modules/pubdlcnt/pubdlcnt.php on line 87 and defined in pubdlcnt_is_valid_file_url() (line 122 of /sites/all/modules/pubdlcnt/pubdlcnt.php).

Same error on views fields or regular node fields

Same result with and without patch from https://www.drupal.org/project/pubdlcnt/issues/3031319 applied.

CommentFileSizeAuthor
#4 pubdlcnt-type-hints-3032147-4-D7.patch1.19 KBchalpin

Comments

masher created an issue. See original summary.

chalpin’s picture

What version of PHP are you running?

masher’s picture

PHP version 5.6.32

chalpin’s picture

StatusFileSize
new1.19 KB

Ah... yes, that would do it. I had forgotten that PHP5.x didn't support scalar type hints. The attached patch fixes the issue for me when I test with PHP 5.6.40. Can you confirm if it works for you as well?

masher’s picture

Yes, that's now working 5.6.32 and 5.6.24.

Many thanks

  • chalpin committed 2e34fe8 on 7.x-1.x
    Issue #3032147 by chalpin: Recoverable fatal error on download link
    
chalpin’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.