Drupal 7.12
Openlayer 7.x-2.0-beta1
Map displayed correctly, but lots of error occur at once:
- Strict warning: Declaration of openlayers_behavior_attribution::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (line 482 of /home/site/public_html/sites/all/modules/ctools/includes/plugins.inc).
- Strict warning: Declaration of openlayers_behavior_boxselect::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (line 482 of /home/site/public_html/sites/all/modules/ctools/includes/plugins.inc).
- Strict warning: Declaration of openlayers_behavior_cluster::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (line 482 of /home/site/public_html/sites/all/modules/ctools/includes/plugins.inc).
- Strict warning: Declaration of openlayers_behavior_dragpan::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (line 482 of /home/site/public_html/sites/all/modules/ctools/includes/plugins.inc).
- Strict warning: Declaration of openlayers_behavior_drawfeatures::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (line 482 of /home/site/public_html/sites/all/modules/ctools/includes/plugins.inc).
- Strict warning: Declaration of openlayers_behavior_fullscreen::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (line 482 of /home/site/public_html/sites/all/modules/ctools/includes/plugins.inc).
- Strict warning: Declaration of openlayers_behavior_geolocate::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (line 482 of /home/site/public_html/sites/all/modules/ctools/includes/plugins.inc).
- Strict warning: Declaration of openlayers_behavior_layerswitcher::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (line 482 of /home/site/public_html/sites/all/modules/ctools/includes/plugins.inc).
- Strict warning: Declaration of openlayers_behavior_mouseposition::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (line 482 of /home/site/public_html/sites/all/modules/ctools/includes/plugins.inc).
- Strict warning: Declaration of openlayers_behavior_navigation::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (line 482 of /home/site/public_html/sites/all/modules/ctools/includes/plugins.inc).
- Strict warning: Declaration of openlayers_behavior_panzoom::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (line 482 of /home/site/public_html/sites/all/modules/ctools/includes/plugins.inc).
- Strict warning: Declaration of openlayers_behavior_panzoombar::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (line 482 of /home/site/public_html/sites/all/modules/ctools/includes/plugins.inc).
- Strict warning: Declaration of openlayers_behavior_permalink::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (line 482 of /home/site/public_html/sites/all/modules/ctools/includes/plugins.inc).
- Strict warning: Declaration of openlayers_behavior_popup::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (line 482 of /home/site/public_html/sites/all/modules/ctools/includes/plugins.inc).
- Strict warning: Declaration of openlayers_behavior_scaleline::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (line 482 of /home/site/public_html/sites/all/modules/ctools/includes/plugins.inc).
- Strict warning: Declaration of openlayers_behavior_tooltip::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (line 482 of /home/site/public_html/sites/all/modules/ctools/includes/plugins.inc).
- Strict warning: Declaration of openlayers_behavior_zoombox::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (line 482 of /home/site/public_html/sites/all/modules/ctools/includes/plugins.inc).
- Strict warning: Declaration of openlayers_behavior_zoomtolayer::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (line 482 of /home/site/public_html/sites/all/modules/ctools/includes/plugins.inc).
- Strict warning: Declaration of openlayers_layer_type_cloudmade::options_form() should be compatible with that of openlayers_layer_type::options_form() in ctools_plugin_load_includes() (line 482 of /home/site/public_html/sites/all/modules/ctools/includes/plugins.inc).
- Strict warning: Declaration of openlayers_layer_type_geojson::options_form() should be compatible with that of openlayers_layer_type::options_form() in ctools_plugin_load_includes() (line 482 of /home/site/public_html/sites/all/modules/ctools/includes/plugins.inc).
- Strict warning: Declaration of openlayers_layer_type_google::options_form() should be compatible with that of openlayers_layer_type::options_form() in ctools_plugin_load_includes() (line 482 of /home/site/public_html/sites/all/modules/ctools/includes/plugins.inc).
- Strict warning: Declaration of openlayers_layer_type_kml::options_form() should be compatible with that of openlayers_layer_type::options_form() in ctools_plugin_load_includes() (line 482 of /home/site/public_html/sites/all/modules/ctools/includes/plugins.inc).
- Strict warning: Declaration of openlayers_layer_type_maptiler::options_form() should be compatible with that of openlayers_layer_type::options_form() in ctools_plugin_load_includes() (line 482 of /home/site/public_html/sites/all/modules/ctools/includes/plugins.inc).
- Strict warning: Declaration of openlayers_layer_type_osm::options_form() should be compatible with that of openlayers_layer_type::options_form() in ctools_plugin_load_includes() (line 482 of /home/site/public_html/sites/all/modules/ctools/includes/plugins.inc).
- Strict warning: Declaration of openlayers_layer_type_raw::options_form() should be compatible with that of openlayers_layer_type::options_form() in ctools_plugin_load_includes() (line 482 of /home/site/public_html/sites/all/modules/ctools/includes/plugins.inc).
- Strict warning: Declaration of openlayers_layer_type_tms::options_form() should be compatible with that of openlayers_layer_type::options_form() in ctools_plugin_load_includes() (line 482 of /home/site/public_html/sites/all/modules/ctools/includes/plugins.inc).
- Strict warning: Declaration of openlayers_layer_type_virtualearth::options_form() should be compatible with that of openlayers_layer_type::options_form() in ctools_plugin_load_includes() (line 482 of /home/site/public_html/sites/all/modules/ctools/includes/plugins.inc).
- Strict warning: Declaration of openlayers_layer_type_wms::options_form() should be compatible with that of openlayers_layer_type::options_form() in ctools_plugin_load_includes() (line 482 of /home/site/public_html/sites/all/modules/ctools/includes/plugins.inc).
- Strict warning: Declaration of openlayers_layer_type_xyz::options_form() should be compatible with that of openlayers_layer_type::options_form() in ctools_plugin_load_includes() (line 482 of /home/site/public_html/sites/all/modules/ctools/includes/plugins.inc).
- Strict warning: Declaration of openlayers_layer_type_yahoo::options_form() should be compatible with that of openlayers_layer_type::options_form() in ctools_plugin_load_includes() (line 482 of /home/site/public_html/sites/all/modules/ctools/includes/plugins.inc).
- Strict warning: Declaration of openlayers_layer_type_openlayers_views_vector::options_form() should be compatible with that of openlayers_layer_type::options_form() in ctools_plugin_load_includes() (line 482 of /home/site/public_html/sites/all/modules/ctools/includes/plugins.inc).
Any ideas?
Comments
Comment #1
rivimeyThe problem is that openlayers.module defines options_form as:
but the inheritors of it are using:
i.e. the "defaults" are missing, which is ok when you call the routine but not ok to override it. I would assume the intention was to merge arrays with the existing one... perhaps like this:
However this is speculation...
Comment #2
choster commentedWe started seeing these messages after our environment was upgraded to PHP 5.4; we did not see them on 5.3.
On a lark, I plugged in rivimey's speculative code, but the warnings persist. When I tried to edit a map, I get a WSOD failure:
Upgrading to 7.x-2.x-dev seems to resolve the issue, so I would recommend doing that.
Comment #3
Yorgg commentedI also confirm gilzero's issue.
"openlayers_layer_type::options_form() in ctools_plugin_load_includes() (line 482)"
I get dozens of these in a view of nodes and also in the openlayers overlay.
Drupal 7.12
Openlayer 7.x-2.0-beta1
Comment #4
meustrus commentedI'm getting these messages as well. I have an explanation for why they would only show up after you upgraded to PHP 5.4: these errors are E_STRICT, and in PHP 5.4 E_STRICT was added to E_ALL. Before 5.4, E_ALL did not include these errors.
As for the code in #1, even though it's reported that it doesn't work I have a suggestion. array_merge can take any number of arguments, so you can simplify like so:
Comment #5
cfgregory commentedsubscribe, I am getting the same errors.
I only get these errors after I start up my geoserver.
PHP 5.4
Postgresql 9.1.3
Comment #6
cfgregory commentedI follow the suggestion of upgrading to dev and I no longer got the errors on my home page. But I still got the errors on my module page.
I then follow meustrus's suggestion and edited openlayers.module and it fix it for me.
Comment #7
meustrus commentedSo that fixes the problem? If I can get some idea what coding standards to use (i.e. which of my suggestions is appropriate) I can roll up a patch against -dev.
Comment #8
cfgregory commentedIt stops the strict errors but then when I went to edit a open layer map, I got the following error:
Fatal error: Cannot access parent:: when current class scope has no parent in /home/user/Public/www/cartaroCivi/sites/all/modules/openlayers/openlayers.module on line 898
Comment #9
meustrus commentedI'm guessing you also applied the changes to
class openlayers_behaviorandclass openlayers_layer_type. That's wrong. Theoptions_formmethod for those functions should look like this (I think?):Comment #10
meustrus commentedI've "upgraded" to the latest 2.x-dev and there are no more errors. I checked some of the code and the functions now appear to be correctly defined. When is the next stable release?
Comment #11
camorim commentedYes, it looks like a duplicate of #1419438: issue strict warning.
For the next stable release there is no preview date.
Comment #12
camorim commentedComment #13.0
(not verified) commentedbetter format