Skip to content
This repository has been archived by the owner on May 2, 2022. It is now read-only.

Fatal Error: Cannot redeclare style_url() within mce_css() #13

Closed
scottlee opened this issue May 11, 2018 · 3 comments · May be fixed by Kluny/plugin-scaffold#1
Closed

Fatal Error: Cannot redeclare style_url() within mce_css() #13

scottlee opened this issue May 11, 2018 · 3 comments · May be fixed by Kluny/plugin-scaffold#1
Assignees
Labels
bug Something isn't working

Comments

@scottlee
Copy link

PHP is throwing a fatal error on L:227 of functions/core.php when mce_css filter is being run. On the post edit screen for example.

Steps to reproduce

  1. Scaffold a new plugin: create-10up plugin my-fancy-plugin
  2. Activate the plugin: wp plugin activate my-fancy-plugin
  3. Attempt to create a new post or page.

Environment

  • WP 4.9.5
  • PHP 7.2.1
  • Chrome
@Kluny
Copy link

Kluny commented May 31, 2018

Duplicate at #22

Kluny added a commit to Kluny/plugin-scaffold that referenced this issue Jun 5, 2018
Fixes 10up#13 & 10up#22. 

```Fatal error: Cannot redeclare Facebook\Elearning\Plugin\Core\style_url() 
(previously declared in /srv/www/fbelearning/public_html/wp-content/plugins/fb-elearning/includes/functions/core.php:115) 
in /srv/www/fbelearning/public_html/wp-content/plugins/fb-elearning/includes/functions/core.php 
on line 261```

Internal method style_url() within mce_css filter threw a fatal error because of another method with the same name. Simple fix is to rename the method.
@nicholasio
Copy link
Member

It would be great to have this fixed as it basically breaks all new plugin we create using this tool.

@behzod
Copy link
Contributor

behzod commented Jun 5, 2018

Note that #14 fixes this issue. It should be just reviewed and merged.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants