Making WordPress.org

Changeset 1186


Ignore:
Timestamp:
01/23/2015 11:45:17 PM (10 years ago)
Author:
dd32
Message:

WordPress.org Notifications: Avoid two PHP Notices from unset variables/array indicies

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/trac-notifications/trac-notifications.php

    r734 r1186  
    118118        );
    119119        foreach ( $components as $component ) {
    120             if ( false === $tree[ $component ] ) {
     120            if ( isset( $tree[ $component ] ) && false === $tree[ $component ] ) {
    121121                continue;
    122122            } elseif ( isset( $subcomponents[ $component ] ) ) {
     
    528528                echo "<ul>\n";
    529529                foreach ( $subcomponents as $subcomponent ) {
    530                     $i++;
    531530                    $checked = checked( ! empty( $notifications['component'][ $subcomponent ] ), true, false );
    532531                    echo '<li><label><input type="checkbox" ' . $checked . 'name="notifications[component][' . esc_attr( $subcomponent ) . ']" /> ' . $subcomponent . "</label></li>\n";
Note: See TracChangeset for help on using the changeset viewer.