• Resolved rbaer

    (@rbaer)


    Hi

    I’ve tried Super RSS Reader and got some deprecated warnings. I’ve fixed the ones that I’ve got and some more that were of the same kind.
    Do you have a repository (github, gitlab …) where I can create a Pull Request or should I send you a patch by email?

    Greetings
    Roland

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author vaakash

    (@vaakash)

    Hi @rbaer,

    Extremekly sorry for the late reply. I read your topic, but missed to reply.

    There is no public repository to submit the changes. Could you please list the changes made? I’ll make the same changes and accomodate it in the next release.

    Thanks,

    Aakash

    Thread Starter rbaer

    (@rbaer)

    Hi @vaakash

    Here are the changes I made in the form of patches:

    Index: includes/utilities.php
    ===================================================================
    --- includes/utilities.php (revision 3106204)
    +++ includes/utilities.php (working copy)
    @@ -23,7 +23,7 @@

    global $post;

    - preg_match_all( '~<img.*?src=["\']+(.*?)["\']+~', $content, $image_urls );
    + preg_match_all( '~<img.*?src=["\']+(.*?)["\']+~', $content ?? '', $image_urls );

    if( empty( $image_urls[1] ) && has_post_thumbnail( $post->ID ) ) {
    $content = '<p>' . get_the_post_thumbnail( $post->ID ) . '</p>' . $content;
    @@ -85,7 +85,7 @@
    );

    foreach( $attributes as $attribute => $regex ){
    - preg_match( $regex, $content, $urls );
    + preg_match( $regex, $content ?? '', $urls );

    if( empty( $urls ) ){
    continue;
    Index: includes/feed.php
    ===================================================================
    --- includes/feed.php (revision 3078518)
    +++ includes/feed.php (working copy)
    @@ -92,7 +92,7 @@
    if( is_wp_error( $feed ) ){
    $feed_title = __( 'Error' );
    }else{
    - $feed_title = ( isset( $tab_titles[$i] ) && !empty( $tab_titles[$i] ) ) ? $tab_titles[$i] : strip_tags( $feed->get_title() );
    + $feed_title = ( isset( $tab_titles[$i] ) && !empty( $tab_titles[$i] ) ) ? $tab_titles[$i] : strip_tags( $feed->get_title() ?? '' );
    }

    $feeds[ $feed_url ] = array(
    @@ -163,7 +163,7 @@
    $link = strip_tags($link);

    // Title
    - $title = strip_tags( $item->get_title() );
    + $title = strip_tags( $item->get_title() ?? '' );
    $title_full = $title;

    if ( empty( $title ) ){
    @@ -187,7 +187,7 @@

    // Date
    $date = '';
    - $date_full = strip_tags( $item->get_date() );
    + $date_full = strip_tags( $item->get_date() ?? '' );

    if( strtolower( $date_format ) == 'relative' ){
    $item_date = $item->get_date( 'U' );
    @@ -228,7 +228,7 @@
    // Description
    $desc = '';
    if( $show_desc ){
    - $desc_content = ( $desc_type == 'summary' ) ? $item->get_description() : $item->get_content();
    + $desc_content = ( $desc_type == 'summary' ) ? ( $item->get_description() ?? '') : ( $item->get_content() ?? '' );
    if( $rich_desc ){
    $desc = wp_kses_post( strip_tags( $desc_content, '<p><a><img><em><strong><font><strike><s><u><b><i><br>' ) );
    }else{

    The changes are to avoid working on non-strings (invalid values).

    Greetings
    Roland

    Plugin Author vaakash

    (@vaakash)

    Hi @rbaer,

    Thanks for taking time and sharing your changes. I’m including this in the next release in a couple of days.

    Thanks,

    Aakash

    Thread Starter rbaer

    (@rbaer)

    ???

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.