I have started testing things out in PHP 5.4 and got the following warning when clicking save a draggable view.

Strict warning: Only variables should be passed by reference in draggableviews_handler_fieldapi->set() (line 120 of /usr/www/sites/all/modules/contrib/draggableviews/handlers/draggableviews_handler_fieldapi.inc).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

iStryker’s picture

Drupal 7 does not support PHP 5.4, however we should make an effort to fix this.

Thanks @NaX. Let us know if you get any other 5.4 errors.

NaX’s picture

In the sort term I don't think its critical but according to me "Drupal 7: PHP 5.2.5 or higher " means that 5.4 is supported. http://drupal.org/requirements

If I find any others I will let you know. I have not moved to 5.4 for production sites yet but will be looking to use it on production sites in the next month or so.

If I find some time this week I will look into it and maybe put a patch together.

NaX’s picture

Status: Active » Needs review
FileSize
637 bytes

Had a quick look at it and it looks like the use of the reset() function is causing the error. I altered it so that the reset function was not needed and the warning went away.

I hope that helps.

iStryker’s picture

NaX can you test this patch against. I pulled this code from draggableviews-sort_taxonomy-1851752-1.patch, from #1851752: Drag handler for saving weight into any column in any base table.

I try this new code with a FieldAPI draggableview and it worked.

NaX’s picture

Status: Needs review » Reviewed & tested by the community

I works great and warnings are gone.
Thanks

NaX’s picture

Has this patch been committed?

iStryker’s picture

Status: Reviewed & tested by the community » Fixed

I was going to commit this with a bigger patch that spanned multiple issue, but I have been too busy to finish it. I feel it is safe enough to commit this.

Commited to #4 to 7.x-2.x-dev. f9471c6

Status: Fixed » Closed (fixed)

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