Title: Call Back Functions &amp; Header Modify Errors
Last modified: August 30, 2016

---

# Call Back Functions & Header Modify Errors

 *  Resolved [ty5280](https://wordpress.org/support/users/ty5280/)
 * (@ty5280)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/call-back-functions-header-modify-errors/)
 * I have been using this plugin for months…starting today in both my prod and test
   instances I get the following when attempting to approve/deny users.
 * I tried deactivating/re-activating…that did not clear the issue.
 * ‘[https://mysite.com/wp-admin/users.php?action=approve&user=35&_wpnonce=4ce4fe07ad](https://mysite.com/wp-admin/users.php?action=approve&user=35&_wpnonce=4ce4fe07ad)
 * Warning: call_user_func_array() expects parameter 1 to be a valid callback, function‘
   set_html_content_type’ not found or invalid function name in /home/mysite/public_html/
   wp-includes/plugin.php on line 213
 * Warning: call_user_func_array() expects parameter 1 to be a valid callback, function‘
   set_html_content_type’ not found or invalid function name in /home/mysite/public_html/
   wp-includes/plugin.php on line 213
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/mysite/public_html/wp-includes/plugin.php:213) in /home/mysite/public_html/
   wp-includes/pluggable.php on line 1207′
 * [https://wordpress.org/plugins/new-user-approve/](https://wordpress.org/plugins/new-user-approve/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [ty5280](https://wordpress.org/support/users/ty5280/)
 * (@ty5280)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/call-back-functions-header-modify-errors/#post-6526238)
 * Interesting development. I restored a copy of the site from the production HostGator
   VPS to a different hosting providers VPS on my dev VPS and the issue is not happening
   on my dev VPS.
 * This error was not happening until today on prod VPS…so what should I be talking
   to HostGator support about with regards to config changes on the server that 
   would cause this?
 *  Thread Starter [ty5280](https://wordpress.org/support/users/ty5280/)
 * (@ty5280)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/call-back-functions-header-modify-errors/#post-6526393)
 * So HG escalated issue to their sys admin and their response is below.
 * This does not explain why all of a sudden the plugin is not working when I have
   been using the plugin for 90+ days and it was working the WP Core 4.3 for nearly
   3 weeks…with the issue just happening in the past few days.
 * This also does not explain why when I do a clone backup using Duplicator and 
   restore it on another VPS that is not hosted by HG the plugin works just fine.
 * However, I do think HG’s response warrants review by the plugin developer:
 * Turning on WordPress debug mode,shows a number of other errors. When I enabled
   WordPress debugging mode, the site appears with these errors:
 * Notice: The called constructor method for WP_Widget is deprecated since version
   4.3.0! Use
 * __construct()
 * instead. in /home/mysite/public_html/wp-includes/functions.php on line 3457
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/mysite/public_html/wp-includes/functions.php:3457) in /home/mysite/public_html/
   wp-includes/pluggable.php on line 1207
 * This points to an incompatible plugin. You’ll want to make sure all your plugins
   are compatible with WordPress 4.3. Looking at [https://wordpress.org/plugins/new-user-approve/faq/](https://wordpress.org/plugins/new-user-approve/faq/),
   it does not list 4.3 as being compatible, though the support forums don’t necessarily
   suggest it’s not.
 * When I grep the contents of all the files on the account, I discover the following:
 * root@tao [/home/mysite/public_html]# grep -R set_html_content_type
    wp-content/
   plugins/new-user-approve/new-user-approve.php: add_filter( ‘wp_mail_content_type’,‘
   set_html_content_type’ ); wp-content/plugins/new-user-approve/new-user-approve.
   php: remove_filter( ‘wp_mail_content_type’, ‘set_html_content_type’ ); wp-content/
   plugins/new-user-approve/new-user-approve.php: public function set_html_content_type(){
 * The error that you’ve reported is being caused by the new-user-approve plugin
   as it’s using some outdated function.
 *  Thread Starter [ty5280](https://wordpress.org/support/users/ty5280/)
 * (@ty5280)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/call-back-functions-header-modify-errors/#post-6526428)
 * So I paid a developer to fix this code. Please add and release an update.
 * The current version of the plugin does not fail on all server configurations (
   which caused a lot of time wasted troubleshooting!).
 * But please fix this so others don’t waste time and money!
 * Issue: Function was being called before declaring it.
 * File Changed:
    new-user-approve/new-user-approve.php
 * Removed “public” in front of the function:
 * Before:
 * public function set_html_content_type() {
    return ‘text/html’; }
 * After:
 * function set_html_content_type() {
    return ‘text/html’; }

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Call Back Functions & Header Modify Errors’ is closed to new replies.

 * ![](https://ps.w.org/new-user-approve/assets/icon-128x128.gif?rev=2544141)
 * [New User Approve](https://wordpress.org/plugins/new-user-approve/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/new-user-approve/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/new-user-approve/)
 * [Active Topics](https://wordpress.org/support/plugin/new-user-approve/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/new-user-approve/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/new-user-approve/reviews/)

 * 3 replies
 * 1 participant
 * Last reply from: [ty5280](https://wordpress.org/support/users/ty5280/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/call-back-functions-header-modify-errors/#post-6526428)
 * Status: resolved