Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Function name conflict with ep() #118

Closed
bobbingwide opened this issue Sep 22, 2024 · 2 comments
Closed

Function name conflict with ep() #118

bobbingwide opened this issue Sep 22, 2024 · 2 comments
Assignees

Comments

@bobbingwide
Copy link
Owner

See bobbingwide/bobbingwide#132

Requirement

To avoid Fatal errors such as this one

[21-Sep-2024 12:51:00 UTC] PHP Fatal error: Cannot redeclare ep() (previously declared in C:\apache\htdocs\wordpress\wp-content\plugins\oik-bwtrace\libs\bobbfunc.php:395) in C:\apache\htdocs\wordpress\wp-content\plugins\sprout-invoices\template-tags\utility.php on line 330

the function named ep(), which is delivered in the libs\bobbfunc.php shared library should be changed to bw_ep().

Proposed solution

The libs\bobbfunc.php shared library file is delivered by several other plugins
but very few of these plugins actually use the function.
So they aren't affected by the change.

Those plugins which do use ep() can be changed in advance of updating oik-bwtrace so that they are no longer dependent upon the function. Rather than changing them to use bw_ep(), they can be changed to use the one line of code equivalent.

From

ep();

to

bw_echo( '</p>' );

Since this change would be a breaking change, if the code were implemented on the wrong order, the major version numbers should be updated for both the plugin ( from 3.5.0 to 4.0.0 ) and the shared library file ( from 3.6.0 to 4.0.0 ).

The update to oik-bwtrace should be delivered after the other affected plugins have been updated.

@bobbingwide
Copy link
Owner Author

See also https://wordpress.org/support/topic/function-name-conflict-too-generic/#post-18028492
which will need to be updated when the new version is delivered.

@bobbingwide
Copy link
Owner Author

Delivered in v4.0.0

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant