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).
Comment | File | Size | Author |
---|---|---|---|
#1 | kwresearch-strict_errors-1655540-2.patch | 2.77 KB | NotGoddess |
#1 | kwresearch-strict_errors_dev-1655540-2.patch | 2.6 KB | NotGoddess |
Comments
Comment #1
NotGoddess CreditAttribution: NotGoddess commentedI 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 :(
Comment #2
kingfisher64 CreditAttribution: kingfisher64 commentedPatch 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
Comment #3
jaoneill CreditAttribution: jaoneill commentedI am new to this. Where do I insert the patch.
Thanks
John
Comment #4
NotGoddess CreditAttribution: NotGoddess commentedA 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.
Comment #5
jaoneill CreditAttribution: jaoneill commentedThanks for the help. I will try it.
John
Comment #6
kumkum29 CreditAttribution: kumkum29 commentedHello,
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.
Comment #7
makokis CreditAttribution: makokis as a volunteer commentedthank you
this patch helped me :)