• Resolved swissspaceboy

    (@swissspaceboy)


    Version: 2.4.7 (local).

    php 8.3

    I get this error message : [24-Dec-2025 11:16:44 UTC] PHP Warning: Undefined variable $link in …broken-link-checker/legacy/includes/any-post.php on line 610

    Analysis of Claude:

    Found it! The $link variable is only set inside the if/elseif conditions. If none match, $link is undefined on line 610.

    Fix: Initialize $link before the conditions:

    $post_type_object = get_post_type_object( $post->post_type );
    if ( ! $post_type_object ) {
    return '';
    }

    if ( 'wp_template' === $post->post_type || 'wp_template_part' === $post->post_type ) {
    • This topic was modified 5 months, 2 weeks ago by swissspaceboy.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.