WordPress.org

Plugin Directory

Changeset 586271


Ignore:
Timestamp:
08/16/12 16:02:43 (20 months ago)
Author:
simonwheatley
Message:

Fix warnings for checkbox values if checkbox is unchecked

Location:
twitter-tracker/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • twitter-tracker/trunk/class-TwitterTracker_Profile_Widget.php

    r586266 r586271  
    6060        $new_instance[ 'preamble' ] = wp_kses( $new_instance[ 'preamble' ], $GLOBALS[ 'TwitterTracker' ]->allowed_html( 'preamble' ) ); 
    6161        $new_instance[ 'username' ] = strip_tags( $new_instance[ 'username' ] ); 
    62         $new_instance[ 'hide_replies' ] = (bool) $new_instance[ 'hide_replies' ]; 
     62        $new_instance[ 'hide_replies' ] = isset( $new_instance[ 'hide_replies' ] ) ? (bool) $new_instance[ 'hide_replies' ] : false; 
    6363        $new_instance[ 'max_tweets' ] = absint( $new_instance[ 'max_tweets' ] ); 
    64         $new_instance[ 'include_retweets' ] = (bool) $new_instance[ 'include_retweets' ]; 
     64        $new_instance[ 'include_retweets' ] = isset( $new_instance[ 'include_retweets' ] ) ? (bool) $new_instance[ 'include_retweets' ] : false; 
    6565        $new_instance[ 'mandatory_hash' ] = strip_tags( $new_instance[ 'mandatory_hash' ] ); 
    6666        $new_instance[ 'html_after' ] = wp_kses( $new_instance[ 'html_after' ], $GLOBALS[ 'TwitterTracker' ]->allowed_html( 'html_after' ) ); 
  • twitter-tracker/trunk/class-TwitterTracker_Widget.php

    r586266 r586271  
    5959        $new_instance[ 'title' ] = strip_tags( $new_instance[ 'title' ] ); 
    6060        $new_instance[ 'preamble' ] = wp_kses( $new_instance[ 'preamble' ], $GLOBALS[ 'TwitterTracker' ]->allowed_html( 'preamble' ) ); 
    61         $new_instance[ 'hide_replies' ] = (bool) $new_instance[ 'hide_replies' ]; 
     61        $new_instance[ 'hide_replies' ] = isset( $new_instance[ 'hide_replies' ] ) ? (bool) $new_instance[ 'hide_replies' ] : false; 
    6262        $new_instance[ 'max_tweets' ] = absint( $new_instance[ 'max_tweets' ] ); 
    6363        $new_instance[ 'mandatory_hash' ] = strip_tags( $new_instance[ 'mandatory_hash' ] ); 
Note: See TracChangeset for help on using the changeset viewer.