Hello, I have been testing this module, and in using [file:ffp:onlyname:original].[file:ffp:extension:original] I get the following when the node is displayed:

Strict warning: Only variables should be passed by reference in filefield_paths_filefield_paths_process_file() (line 475 of C:\xampp\htdocs\sites\all\modules\filefield_paths\filefield_paths.module).

Thanks.

Comments

Julia_yl’s picture

Same problem as you have.

pillarsdotnet’s picture

Status: Active » Needs review
StatusFileSize
new1.21 KB

Patch/fix. The first parameter to file_prepare_directory is passed by reference and thus must be a variable.

Tim Jones Toronto’s picture

Thanks Bob - patch/fix works fine.

johnv’s picture

Status: Needs review » Closed (duplicate)

This is a duplicate of #1005574: PHP 5.3 compatibility issue: Only variables should be passed by reference. The other issue is older and has a bigger patch.

dercheffe’s picture

Version: 7.x-1.x-dev » 7.x-1.0-beta3
Status: Closed (duplicate) » Active

Hello together,

I still have this error using D 7 beta3 version, for upload some pictures. The upload process itself works fine, but this warning message still appears. Any solutions?

best wishes,

phil

deciphered’s picture

Status: Active » Closed (duplicate)

Please don't re-open closed issues. I'm fairly certain this has been fixed in dev, but feel free to open a new issue if you can confirm it is not.

Cheers,
Deciphered.

ayan_d’s picture

For D 7 beta3 version the patch as specified in #2 worked for me with a slight variation in filefield_paths/modules/filefield_paths.inc as follows:

Replace
if (file_prepare_directory(drupal_dirname($file['uri']), FILE_CREATE_DIRECTORY) && file_move((object) $old_file, $file['uri'])) {
...
}

with

if(!empty($file['filepath']['new'])){
$dirname = dirname($file['filepath']['new']);
if (file_prepare_directory($dirname, FILE_CREATE_DIRECTORY) && file_move((object) $file['field'], $file['filepath']['new'])) {
...
}
}