In setting up this module I've encountered a few strict warnings for PHP 5.3.
You can't pass the results of a function through render(&$element) as it accepts the argument as a reference. The results need to be assigned to a variable, then passed.
Patch attached shortly.

Strict warning: Only variables should be passed by reference in kwresearch_keywords_list_page() (line 52 of kwresearch/includes/site_report.inc).
Strict warning: Only variables should be passed by reference in kwresearch_keywords_list_edit() (line 179 of kwresearch/kwresearch.admin.inc).
Strict warning: Only variables should be passed by reference in kwresearch_site_keywords_import() (line 320 of kwresearch/kwresearch.admin.inc).
Strict warning: Only variables should be passed by reference in kwresearch_google_keywords_import() (line 31 of kwresearch/modules/kwresearch_google/kwresearch_google.module).
Strict warning: Only variables should be passed by reference in kwresearch_keyword_stats_report_page() (line 40 of kwresearch/includes/stats_report.inc).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

NotGoddess’s picture

Status: Active » Needs review
FileSize
2.6 KB
2.77 KB

I could not roll a git patch against the dev branch- git would not acknowledge it existed.
Attached is a patch against the current revision via git and a hand-rolled one against dev.
Some one will likely need re-roll them, sorry :(

kingfisher64’s picture

Patch kwresearch-strict_errors-1655540-2.patch worked great - thank you.

Applied kwresearch-strict_errors-1655540-2.patch against latest dev version of mod.

kwresearch.admin.inc
kwresearch_google.module
site_report.inc
stats_report.inc

jaoneill’s picture

I am new to this. Where do I insert the patch.

Thanks
John

NotGoddess’s picture

A patch file is a collection of line changes to a file - google to get more of a general overview.
There are instructions on applying patches in various ways here: http://drupal.org/patch/apply
Or you can do it manually by opening the patch file and reading it. It's a list of files and lines to remove (-) and add (+). The patches show a few lines of code around the changed lines to help you find them in case it's be updated since the patch was last rolled.

jaoneill’s picture

Thanks for the help. I will try it.
John

kumkum29’s picture

Issue summary: View changes

Hello,

i get the same error when I install this module (alpha4 version & dev version):
Strict warning : Only variables should be passed by reference in kwresearch_keywords_list_page() (line 52 dans /srv/data/web/vhosts/www.mysite.com/htdocs/sites/all/modules/kwresearch/includes/site_report.inc).

This patch solves this problem ? If yes have you planned to include this patch in a new version ?

Thanks.

makokis’s picture

thank you
this patch helped me :)