Support » Plugin: Groups 404 Redirect » The redirect throws Internal Error 500

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Dennis

    (@enggsoldennis)

    I’ve looked into the code, and found that this part is causing the error

    if ( method_exists( 'Groups_Restrict_Categories', 'user_can_read' ) ) {
       $is_restricted_by_term = !Groups_Restrict_Categories::user_can_read( $current_post_id );
    }

    so I tried replacing the first line

    if ( class_exists( 'Groups_Restrict_Categories' ) ) {
       $is_restricted_by_term = !Groups_Restrict_Categories::user_can_read( $current_post_id );
    }

    and that fixed the error 500

    Plugin Author itthinx

    (@itthinx)

    Hi,

    Many thanks for sharing that. I’ve just seen your post here, had I seen it before it could have saved me a couple of hours 😉 You’re right, the call to method_exists() is involved in the issue. There is a bug in some versions of PHP where a call to method_exists( $class, $method ) when the $class does effectively not exist will result in a segmentation fault. I’ve added a fix that circumvents this bug and released version 1.2.3.

    Cheers

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘The redirect throws Internal Error 500’ is closed to new replies.