Make WordPress Core

Ticket #14543: 14543.2.patch

File 14543.2.patch, 559 bytes (added by JohnPBloch, 14 years ago)

Changing ternary operators to regular if statement

  • wp-includes/default-widgets.php

     
    567567                $instance = $old_instance;
    568568                $instance['title'] = strip_tags($new_instance['title']);
    569569                $instance['number'] = (int) $new_instance['number'];
     570                if( $instance['number'] < 1 || $instance['number'] > 15 )
     571                        $instance['number'] = 5;
    570572                $this->flush_widget_cache();
    571573
    572574                $alloptions = wp_cache_get( 'alloptions', 'options' );