Support » Plugin: smart User Slug Hider » Function mcrypt_encrypt() is deprecated

  • Resolved optimizewordpress

    (@optimizewordpress)



    Hi,
    just a note to let you know your plugin code is using a deprecated function with PHP 7.1 and to ask you if you plan to fix it and when.

    PHP Deprecated:  Function mcrypt_encrypt() is deprecated in /public_html/wp-content/plugins/smart-user-slug-hider/inc/class-smart-user-slug-hider.php on line 222

    I read about different solutions to make it compliant with PHP 7.1 and 7.2, but I let this to your expertise.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Peter Raschendorfer

    (@petersplugins)

    Thanks a lot for your hint. I already know that and I’ve fiddled around some hours yet to replace it by openssl_encrypt() but I did not make it to get the same result. As far as I know so far it is not possible. This means all the generated slugs would change. I do not have a solution yet. Any help is welcome.

    Peter

    Thanks Peter,
    from what I read around, you can safely continue to use it, just suppress the warning message, so that no one can complain about it.
    Some hints here:
    https://github.com/magento/magento2/issues/5880
    Hope this helps.

    Plugin Author Peter Raschendorfer

    (@petersplugins)

    Thanks for that, but suppressing warnings is not a good behavior in my opinion. It should be left to the user to decide which messages should be shown or not. By default WordPress does not show any PHP messages. If someone activates display of warnings this setting should not be changed by a plugin. There will be a reason why he activated this.

    Maybe mcrypt will be removed completely in a future PHP version. At the latest then I have the same problem again…

    Plugin Author Peter Raschendorfer

    (@petersplugins)

    Version 2 is now available. It introduces a new encryption method, I called it Future Safe Mode. Unfortunately it is not possible to get the same result. This means that the coded User Slug changes if Future Safe Mode is activated.

    I’m marking this topic as resolved.

    Peter

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.