Support » Plugin: demon image annotation » PHP7 deprecated function call

  • Resolved rekcah



    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



    Can you try replace the code mysql_real_escape_string to mysqli_real_escape_string in imageannotation.php

    Thread Starter rekcah



    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.