Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

create_function() deprecated and headers already sent warning #69

Open
jasperf opened this issue Mar 9, 2019 · 2 comments
Open

create_function() deprecated and headers already sent warning #69

jasperf opened this issue Mar 9, 2019 · 2 comments

Comments

@jasperf
Copy link

jasperf commented Mar 9, 2019

Getting this

Function create_function() is deprecated in /www/htdocs/user/site/wp-content/plugins/our-team-by-woothemes/classes/class-woothemes-widget-our-team.php on line 324

This is related to PHP 7.2 setups.

But also a warning related to this deprecated function:

[09-Mar-2019 00:34:14 UTC] PHP Warning:  Cannot modify header information - headers already sent by (output started at /www/htdocs/user/site/wp-content/plugins/our-team-by-woothemes/classes/class-woothemes-widget-our-team.php:324) in /www/htdocs/user/site/wp-includes/pluggable.php on line 1251

Seems this plugin has not been updated for a while. Will an update be made any time soon?

@jasperf
Copy link
Author

jasperf commented Mar 9, 2019

I think

/* Register the widget. */

add_action(
	 'widgets_init', 
	 function () {
		return register_widget('Woothemes_Widget_Our_Team');
},
1
);

instead of create_function will do the trick.

@jeffikus
Copy link
Contributor

@jasperf would you like to submit a PR and I'll get it merged? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants