Hey everyone,

Earlier today I installed AIS, and so far it's working exactly the way I expected it to. There is however one thing that does pop up every once in a while - a PHP Strict Warning. As far as I can tell, this doesn't impede functioning in any way, but I thought I'd drop it here anyway.

Strict warning: Only variables should be passed by reference in ais_image_style_deliver() (line 107 of C:\Documents and Settings\PixelSmash\My Documents\xampp\htdocs\pixelsmash\sites\all\modules\contrib\ais\ais.module).

CommentFileSizeAuthor
#1 ais-strict-warning-1967688-1.patch952 bytespixelsmash
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pixelsmash’s picture

Created a small patch that should fix the issue. Hope it works, since it's the first time I've created a patch - so apologies in advance if I make a mistake. In short: create a variable for variable_get('ais_adaptive_styles', array()) first, then use that in the call to _ais_is_used. (As opposed to using the variable_get straight away in _ais_is_used, the way it is now)

pixelsmash’s picture

Status: Active » Needs review
stevieegee’s picture

I don't understand the intricacies of php code but the patch worked for me! Thank you.

spotzero’s picture

Status: Needs review » Fixed

Looks good. Committed to dev branch.

Status: Fixed » Closed (fixed)

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

jeffpurtle’s picture

I'm getting this error too and I have the latest version of AIS.

pixelsmash’s picture

jeff, as far as I can tell the patch was committed to the dev branch, but not (yet) to the stable release. 7.x-1.6 stable was updated before I even opened this issue.

thomas.claes’s picture

Issue summary: View changes

When will the patched version be commited to the stable branch?

doitDave’s picture

Version: 7.x-1.6 » 7.x-1.x-dev
Status: Closed (fixed) » Reviewed & tested by the community

I would like to see this in a branch considered stable before it is considered "fixed", since few would like to have a "dev" branch snapshot in a prod env. Would be nice if we could see a new release. Thanks!

Edit: Confirmed working, no side-effects detected, original issue is solved by this.

spotzero’s picture

Status: Reviewed & tested by the community » Fixed

I've pushed a release. 7.x-1.7 should be available soon.

doitDave’s picture

Great! Thank you!

Status: Fixed » Closed (fixed)

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