ellatrix / wp-front-end-editor

Front-end Editor for WordPress
https://wordpress.org/plugins/wp-front-end-editor/
341 stars 87 forks source link

PHP Warnings on FEE_Field_[FieldName] implementations of wrap() #310

Open apotek opened 7 years ago

apotek commented 7 years ago

Expected behaviour and actual behaviour

Plugin works as expected, but generates a WARNING on every wordpress execution, targeting various fields. Some examples:

PHP Warning: Declaration of FEE_Field_Single_Title::wrap($title) should be compatible with FEE_Field_Term_Field::wrap($content, $term_id, $taxonomy) in /foo/bar/wordpress/wp-content/plugins/front-end-editor/php/fields/other.php on line 0

PHP Warning: Declaration of FEE_Field_Option::wrap($content, $key, $ui) should be compatible with FEE_Field_Base::wrap($content, $data) in /foo/bar/wordpress/wp-content/plugins/front-end-editor/php/fields/other.php on line 0

PHP Warning: Declaration of FEE_Field_Term_Field::wrap($content, $term_id, $taxonomy) should be compatible with FEE_Field_Base::wrap($content, $data) in /foo/bar/wordpress/wp-content/plugins/front-end-editor/php/fields/other.php on line 0

The signature of the base clase is different than the signature in the implemented class. This can lead to bugs, and given the name of the parameters, I would imagine there is a bug here, though I haven't experienced a behavior.

Steps to reproduce the problem

Load any wordpress page with front-end-editor plugin installed.

Specifications

Error messages

PHP Warning: Declaration of FEE_Field_Single_Title::wrap($title) should be compatible with FEE_Field_Term_Field::wrap($content, $term_id, $taxonomy) in /foo/bar/wordpress/wp-content/plugins/front-end-editor/php/fields/other.php on line 0

apotek commented 7 years ago

Might point out I am using php 7.0

1BJK903 commented 7 years ago

Have the same problem right now...