Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello. I have got this strict error on Location Map:
Strict warning: Only variables should be passed by reference in locationmap_page() (line 240 of C:\xampp\htdocs\drupal\sites\all\modules\locationmap\locationmap.module).
The module works apparently correctly, but this warning persists.
Do you have any suggestions? Thanks in advance for your help.
Comment | File | Size | Author |
---|---|---|---|
#3 | StrictWarningmsg.png | 96 KB | AAgrios |
Comments
Comment #1
wayne2011 CreditAttribution: wayne2011 commentedI've got the identical problem.
Comment #2
Caffeine Addict CreditAttribution: Caffeine Addict commentedI installed this module last night and haven't managed to get this error. Could you post steps to replicate, I could look at it...
Comment #3
AAgrios CreditAttribution: AAgrios commentedI also received the same message using location map. All seems to work fine.. except this error appears on my location page. Tried using another API key just to troubleshoot, but no luck. Ideas?
"
Strict warning: Only variables should be passed by reference in locationmap_page() (line 240 of /Users/agriosa/Sites/acquia-drupal/sites/all/modules/locationmap/locationmap.module). "
Comment #4
wayne2011 CreditAttribution: wayne2011 commentedCaffeine Addict, basically, I just installed and configured then went to the default path and got the error page. Still do whenever I visit the page while being logged in but it seems to work without issues.
Comment #5
Caffeine Addict CreditAttribution: Caffeine Addict commentedCan you list the settings you are using excluding the API key?
I've been changing all the settings on a staging site using this module and i can't replicate... If you can list all the settings i'll try using the exact same ones to replicate the issue.
Comment #6
Caffeine Addict CreditAttribution: Caffeine Addict commentedOh hang on, you are using php error reporting on the strict setting! Ok i'll be able to replicate that now...
Comment #7
Caffeine Addict CreditAttribution: Caffeine Addict commentedLine erroring:
if (user_access('administer locationmap')) {
// TODO: Remove drupal_render and update to D7 desired behaviour. See http://drupal.org/update/modules/6/7#unrendered
$output .= drupal_render(drupal_get_form('locationmap_in_place_edit_form'));
}
Looks like its to do with arrays / variables / strings :
http://stackoverflow.com/questions/2354609/strict-standards-only-variabl...
I personally wouldn't run a production enviroment on strict error reporting... (though in a perfect world that shouldn't be an issue ;-) )
Comment #8
rupertj CreditAttribution: rupertj commentedThe error's triggered by passing the output from drupal_get_form straight into drupal_render. If you assign it to a var first, the error goes away.
Comment #9
rupertj CreditAttribution: rupertj commentedI've fixed this and released a 1.2 release with the fix in.