Title: Fatal error when saving plugin settings
Last modified: August 18, 2023

---

# Fatal error when saving plugin settings

 *  Resolved [grimpa](https://wordpress.org/support/users/grimpa/)
 * (@grimpa)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/fatal-error-when-saving-plugin-settings/)
 * WordPress current version: 5.6.30
 * I’ve installed the plugin Click to Chat, but when I’m trying to save the phone
   number I’m getting the follow error:
 * **Fatal error**: Call to undefined function sanitize_textarea_field() in **/wp-
   content/plugins/click-to-chat-for-whatsapp/new/admin/class-ht-ctc-admin-main-
   page.php** on line **494**

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

 *  Plugin Author [bhvreddy](https://wordpress.org/support/users/bhvreddy/)
 * (@bhvreddy)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/fatal-error-when-saving-plugin-settings/#post-16985387)
 * Hi,
 * Thank you so much for the message.
 * Please give us some time; possible, by Monday, we will make a fix for this and
   release a new version.
 * Sorry for the inconvenience caused
 * Have a nice day!
 *  Plugin Author [bhvreddy](https://wordpress.org/support/users/bhvreddy/)
 * (@bhvreddy)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/fatal-error-when-saving-plugin-settings/#post-16988061)
 * Hi,
 * We fixed the issue and released version 3.29.3
   Please update the plugin. If there
   is any issue, please let us know.
 * Thank you so much for reporting the issue.
   Have a nice day!
 *  Thread Starter [grimpa](https://wordpress.org/support/users/grimpa/)
 * (@grimpa)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/fatal-error-when-saving-plugin-settings/#post-16988986)
 * Hi [@bhvreddy](https://wordpress.org/support/users/bhvreddy/)
 * Thanks a lot for the quick fix!
 * 
   I saw that you fixed this by creating a condition to check if the function exists,
   otherwise, use a sanitize_text_field().
 * Despite the fact that if the function does not exist the break lines are not 
   removed from the “Pre-Filled Message”, it’s ok and now saving without any errors.
   I don’t see this as a problem to use the plugin.
 * Thank you very much.
    -  This reply was modified 2 years, 7 months ago by [grimpa](https://wordpress.org/support/users/grimpa/).
 *  Plugin Author [bhvreddy](https://wordpress.org/support/users/bhvreddy/)
 * (@bhvreddy)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/fatal-error-when-saving-plugin-settings/#post-16989143)
 * Yeah, said perfectly. If the sanitize_textarea_field function does not exist,
   line breaks won’t work. Sorry about this.
   Have to sanitize settings before saving
   them to the database.We will once again work on it to implement a better way.
 *  Thank you,
   Have a nice time

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

The topic ‘Fatal error when saving plugin settings’ is closed to new replies.

 * ![](https://ps.w.org/click-to-chat-for-whatsapp/assets/icon-256x256.gif?rev=2892731)
 * [Click to Chat - HoliThemes](https://wordpress.org/plugins/click-to-chat-for-whatsapp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/click-to-chat-for-whatsapp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/click-to-chat-for-whatsapp/)
 * [Active Topics](https://wordpress.org/support/plugin/click-to-chat-for-whatsapp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/click-to-chat-for-whatsapp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/click-to-chat-for-whatsapp/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [bhvreddy](https://wordpress.org/support/users/bhvreddy/)
 * Last activity: [2 years, 7 months ago](https://wordpress.org/support/topic/fatal-error-when-saving-plugin-settings/#post-16989143)
 * Status: resolved