• Resolved wp_edu

    (@alemao2k6)


    A warning is being thrown in debug.log all the time, after I have updated the server to PHP 8:

    [17-Apr-2023 01:40:04 UTC] PHP Deprecated: Required parameter $route follows optional parameter $code in *wp-home*/wp-content/plugins/license-manager-for-woocommerce/includes/abstracts/RestController.php on line 25

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @alemao2k6

    I hope you are doing well.

    Let me check and fix this issue in our upcoming release.

    Thanks and regards,
    Support Team – WPExperts

    Thread Starter wp_edu

    (@alemao2k6)

    For the moment, I’m fixing this by changing the following code in line 25:

    protected function response($success, $data, $code = 200, $route)
        {
            return new WP_REST_Response(...

    With:

    protected function response($success, $data, $code, $route)
        { 
             if ( $code == null ){
                  $code = 200;
             }
            return new WP_REST_Response(...

    Please let me know if you think it will generate any problems on lmfwc.

    Thanks,

    Edu

    @alemao2k6 Its okay, it won’t cause any problems.

    Thanks

    Thread Starter wp_edu

    (@alemao2k6)

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Deprecated function style in PHP 8’ is closed to new replies.