Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 7.4 - replace {} with [] on 499 and 500 #32

Closed
julian-sloman-ffatg opened this issue Mar 17, 2020 · 1 comment
Closed

PHP 7.4 - replace {} with [] on 499 and 500 #32

julian-sloman-ffatg opened this issue Mar 17, 2020 · 1 comment
Assignees
Milestone

Comments

@julian-sloman-ffatg
Copy link

julian-sloman-ffatg commented Mar 17, 2020

Hi Sami,

As per WP Support topic there's still some PHP 7.4 compatibility issues that need to be sorted out. This one is easy:

/wp-content/plugins/custom-permalinks/frontend/class-custom-permalinks-frontend.php on lines 499 and 500 uses { curly brackets } instead of [ square ones ] which makes PHP 7.4 upset, since it's depreciated.

$string { 0 }

if ( trim( $_CPRegisteredURL, '/' ) == trim( $request, '/' ) ) {
      if ( isset( $url['path'] ) ) {
        return ( $string{0} == '/' ? '/' : '' ) . trailingslashit( $url['path'] ) . $_CPRegisteredURL;
      } else {
        return ( $string{0} == '/' ? '/' : '' ) . $_CPRegisteredURL;
      }
    }
    return $string;
@samiahmedsiddiqui samiahmedsiddiqui self-assigned this Apr 6, 2020
@samiahmedsiddiqui samiahmedsiddiqui added this to the 2.0.0 milestone Apr 6, 2020
@samiahmedsiddiqui
Copy link
Owner

samiahmedsiddiqui commented Apr 7, 2020

@julian-sloman-ffatg Thank you for reporting this issue and sorry about my late response. I have fixed this issue and the fix will be released soon with a bunch of other things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants