Title: Function create_function() is deprecated in
Last modified: November 12, 2018

---

# Function create_function() is deprecated in

 *  Resolved [beukel](https://wordpress.org/support/users/beukel/)
 * (@beukel)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/function-create_function-is-deprecated-in/)
 * Dear developer,
 * I am using the spornsor plugin together with php 7.2. I do get an error message
   as shown below. I have no idea how to fix this. Could you possibly help me?
 * Deprecated: Function create_function() is deprecated in F:\Documenten\xampp\apps\
   wordpress\htdocs\wp-content\plugins\wp-sponsors\includes\class-wp-sponsors-widget.
   php on line 168

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

 *  [janhenckens](https://wordpress.org/support/users/janhenckens/)
 * (@janhenckens)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/function-create_function-is-deprecated-in/#post-10874961)
 * Hey there
    Can you check that you’re running the latest version of the plugin?
   This was fixed in 2.5.0.
 *  Thread Starter [beukel](https://wordpress.org/support/users/beukel/)
 * (@beukel)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/function-create_function-is-deprecated-in/#post-10876719)
 * Thanks for your feedback.
 * Yes, I did use version 2.5.0 downloaded from [https://wordpress.org/plugins/wp-sponsors/](https://wordpress.org/plugins/wp-sponsors/)
 * The last 2 lines of class-wp-sponsors-widget.php has the following content (with
   the create_funtion):
 * // end class sponsors_widget
    add_action(‘widgets_init’, create_function(”, ‘
   return register_widget(“sponsors_widget”);’));
 *  [janhenckens](https://wordpress.org/support/users/janhenckens/)
 * (@janhenckens)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/function-create_function-is-deprecated-in/#post-10876894)
 * Something must have gone wrong with the previous release. I busted pushed out
   a new update, could you install that and try again?
 * Thanks!
 *  Thread Starter [beukel](https://wordpress.org/support/users/beukel/)
 * (@beukel)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/function-create_function-is-deprecated-in/#post-10884896)
 * I just updated it and now it works perfect. Thanks a lot!

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

The topic ‘Function create_function() is deprecated in’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-sponsors_e7e7e7.svg)
 * [Sponsors](https://wordpress.org/plugins/wp-sponsors/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-sponsors/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-sponsors/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-sponsors/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-sponsors/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [beukel](https://wordpress.org/support/users/beukel/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/function-create_function-is-deprecated-in/#post-10884896)
 * Status: resolved