• Barn2 Plugins

    (@barn2media)


    Hi Sean

    I hope you are well. I need to update our server to PHP7 and there’s an error with the SB Welcome Email Editor plugin when I run WP Engine’s PHP7 compatibility checker, please could you fix this. The errors are:

    FILE: /nas/content/live/doctorschemist/wp-content/plugins/welcome-email-editor/sb_welcome_email_editor.php
    ————————————————————————————————————–
    FOUND 1 ERROR AFFECTING 1 LINE
    ————————————————————————————————————–
    912 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and removed since PHP 7.0 – use mysqli instead.

    Thanks very much

    Katie

Viewing 1 replies (of 1 total)
  • I second this request. I would rather not make changes to the plugin code that may be overwritten on next update. I think the fix is to change “mysql_real_escape_string” to “mysqli_real_escape_string”, but the parameters are different, so I am not sure the complete change. Here is the offending code….

    function sb_we_get_superglobal($array, $key, $default=”, $escape=false, $strip_tags=false) {
    if (isset($array[$key])) {
    $default = $array[$key];
    if ($escape) {
    $default = mysql_real_escape_string($default);
    }

    If someone can provide the correct code here, I guess I could edit the plugin and then hope the next upgrade has the same change.

Viewing 1 replies (of 1 total)
  • The topic ‘PHP7 error’ is closed to new replies.