backdrop-contrib / footnotes

Add automatically numbered footnotes to your content.
GNU General Public License v2.0
2 stars 2 forks source link

footnotes_views: init method needs public declaration #23

Closed herbdool closed 5 years ago

herbdool commented 5 years ago

I see this type of error when adding the views fields:

Declaration of footnotes_views_handler_field_body_content::init(&$view, $options) should be compatible with views_handler_field_entity::init(&$view, &$options)

Simple fix is to add public to function init() like:

public function init(&$view, &$options) {
olafgrabienski commented 5 years ago

Thanks for reporting! I've seen a bunch of other notices (cf. issue #13) but not this one, may have overseen it. Re the mentioned fix, there seem to be two files with the same line:

(a) footnotes_views_handler_field_body_content.inc, l. 13: function init(&$view, $options) {

(b) footnotes_views_handler_field_body_footnotes.inc, l. 10: function init(&$view, $options) {

I guess both have to be changed.

herbdool commented 5 years ago

Yes add the public to each.

olafgrabienski commented 5 years ago

@herbdool I've made a pull request, do you want to review or test it, or should I merge it right away?