Title: PHP7 deprecated function call
Last modified: April 30, 2018

---

# PHP7 deprecated function call

 *  Resolved [rekcah](https://wordpress.org/support/users/rekcah/)
 * (@rekcah)
 * [8 years ago](https://wordpress.org/support/topic/php7-deprecated-function-call/)
 * Hello,
 * I really like this plugin, but the hosting service that host my site upgrade 
   to PHP7, I get the following:
 * Fatal error: Uncaught Error: Call to undefined function mysql_real_escape_string()
   in /var/www/wp-content/plugins/demon-image-annotation/imageannotation.php:336
   Stack trace: #0 /var/www/blog/wp-includes/class-wp-hook.php(286): dia_admin_notice(”)#
   1 /var/www/blog/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(false,
   Array) #2 /var/www/blog/wp-includes/plugin.php(453): WP_Hook->do_action(Array)#
   3 /var/www/blog/wp-admin/admin-header.php(255): do_action(‘admin_notices’) #4/
   var/www/blog/wp-admin/admin.php(216): require_once(‘/var/www/wp-c…’) #5 {main}
   thrown in /var/www/wp-content/plugins/demon-image-annotation/imageannotation.
   php on line 336
 * I notified the hosting service of the issue, they stated that the plugin has 
   deprecated code and requested that I notify the plugin developer to update the
   code for PHP7.
 * Is this an easy fix?
 * Thank you.

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

 *  Plugin Author [demonisblack](https://wordpress.org/support/users/demonisblack/)
 * (@demonisblack)
 * [8 years ago](https://wordpress.org/support/topic/php7-deprecated-function-call/#post-10231402)
 * Hi,
 * Can you try replace the code **mysql_real_escape_string** to **mysqli_real_escape_string**
   in **imageannotation.php**
    -  This reply was modified 8 years ago by [demonisblack](https://wordpress.org/support/users/demonisblack/).
 *  Thread Starter [rekcah](https://wordpress.org/support/users/rekcah/)
 * (@rekcah)
 * [8 years ago](https://wordpress.org/support/topic/php7-deprecated-function-call/#post-10245850)
 * demonisblack,
 * You are awesome!!!
 * Replacing mysql_real_escape_string with mysqli_real_escape_string in imageannotation.
   php resolved the issue.
 * Thank you!!!

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

The topic ‘PHP7 deprecated function call’ is closed to new replies.

 * ![](https://ps.w.org/demon-image-annotation/assets/icon-256x256.png?rev=2687162)
 * [demon image annotation](https://wordpress.org/plugins/demon-image-annotation/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/demon-image-annotation/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/demon-image-annotation/)
 * [Active Topics](https://wordpress.org/support/plugin/demon-image-annotation/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/demon-image-annotation/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/demon-image-annotation/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [rekcah](https://wordpress.org/support/users/rekcah/)
 * Last activity: [8 years ago](https://wordpress.org/support/topic/php7-deprecated-function-call/#post-10245850)
 * Status: resolved