Plugin Directory

Changeset 1820212


Ignore:
Timestamp:
02/11/2018 10:31:02 PM (8 years ago)
Author:
poisl
Message:

removed some warnings in the log, when no events exist

File:
1 edited

Legend:

Unmodified
Added
Removed
  • event-scheduler/trunk/public/partials/event-scheduler-public-event-statistics-display.php

    r1820149 r1820212  
    4444                    echo "<td style='color:red'>" . $row['maximumCancels'] . "</td>";
    4545                    echo "<td style='font-size:8px'>";
    46                     foreach ($row['tops'] as $top) {
    47                         $user_info = get_userdata($top['participantId']);
    48                         echo $user_info->first_name . " " . $user_info->last_name . " (" . $top['eventsAccepted'] . ") <br>";
     46                    if ($row['tops']) {
     47                        foreach ($row['tops'] as $top) {
     48                            $user_info = get_userdata($top['participantId']);
     49                            echo $user_info->first_name . " " . $user_info->last_name . " (" . $top['eventsAccepted'] . ") <br>";
     50                        }
    4951                    }
    5052                    echo "</td>";
     
    5658
    5759    <?php elseif (!$statistics) : ?>
    58         <?php _e('No events existing.', $this->plugin_name); ?></div>
     60        <?php _e('No events existing.', $this->plugin_name); ?>
    5961    <?php endif; ?>
    6062
Note: See TracChangeset for help on using the changeset viewer.