Two plugins using the_title; one not passing second param.

I have this issue in some of my own plugins, and it’s an easy fix. Basically, I label this a “lazy developer” issue. It’s a matter of someone adding a filter but not taking optional parameters into account.

Step 1 – Edit the plugin file

The code that’s breaking starts around line 639 (according to your debug info):

function pfund_handle_title( $atitle, $post_id ) {
    global $post;
    if ( ! pfund_is_pfund_post( ) || $post_id != $post->ID ){
        return $atitle;
    }
    return pfund_get_value( $_REQUEST, 'pfund-camp-title', $atitle );
}

What we need to do is change the function just a little bit to accept an omitted $post_id:

function pfund_handle_title( $atitle, $post_id = null ) {
    global $post;
    if ( null == $post_id || ! pfund_is_pfund_post( ) || $post_id != $post->ID ){
        return $atitle;
    }
    return pfund_get_value( $_REQUEST, 'pfund-camp-title', $atitle );
}

If no $post_id is supplied, we just return the title instead. It’s essentially a short-circuit to insulate against lazy developers not submitting all of the proper data.

Step 2 – Submit a patch

Please send this code back to the original developer and ask it to be incorporated into future versions. Otherwise, when they release an update, you’ll be forced to re-patch your code over and over again.