Opened 7 years ago
Closed 7 years ago
#3211 closed defect (bug) (invalid)
Cannot redeclare function as JetPack uses that function name already
Reported by: | casiepa | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | WordPress.tv | Keywords: | |
Cc: |
Description
Provisionning a local vvv install, I'm getting the following error:
==> default: Fatal error: Cannot redeclare video_image_url_by_guid() (previously declared in /srv/www/wordpress-meta-environment/meta-repository/wordpress.tv/public_html/wp-content/mu-plugins/sandbox-functionality.php:20) in /srv/www/wordpress-meta-environment/meta-repository/wordpress.tv/public_html/wp-content/plugins/jetpack/modules/videopress/utility-functions.php on line 630
Please change the name of the function in the sandbox mu plugin for WPTV.
Change History (4)
This ticket was mentioned in Slack in #meta-wordcamp by casiepa. View the logs.
7 years ago
#3
@
7 years ago
There is already a PR for this in the meta environment https://github.com/WordPress/meta-environment/pull/97
That file only exists in Meta Environment repo on GitHub, so perhaps it should have been reported there, but I guess here is fine as well :)
The function is there as a fallback so it could be used in
the_video()
andthe_video_image()
in wptv2 theme without Jetpack, so changing the name doesn't make much sense.I think it should be moved to the theme itself, with a
function_exists()
check (a check alone wouldn't be enough, asmu-plugins
load earlier than regular plugins).