• Resolved heramb22

    (@heramb22)


    I created a league, season, venue and teams with no issues. However, when I create events and view them in the event listing admin page (/wp-admin/edit.php?post_type=sp_event) I am seeing PHP warnings.

    Warning: end() expects parameter 1 to be array, null given in /private/var/www/mysite.com/wp-content/plugins/sportspress/admin/hooks/manage-posts-columns.php on line 46
    
    Warning: prev() expects parameter 1 to be array, null given in /private/var/www/mysite.com/wp-content/plugins/sportspress/admin/hooks/manage-posts-columns.php on line 47

    I can get these to go away by opening the event and simply hitting update, but wanted to let you know to see if I was simply doing something wrong, or if something wasn’t getting added/updated with the initial event save.

    None of my teams has any results, so the $team_results variable set on line 41 is set to null, thus causing the error. Once I view and update the event it seems to fix it and doing a print_r yields the expected array.

    Array ( [first] => [second] => [third] => [fourth] => [fifth] => [sixth] => [seventh] => [eighth] => [ninth] => [extra] => [r] => [h] => [e] => [outcome] => )
    River RidgeArray ( [first] => [second] => [third] => [fourth] => [fifth] => [sixth] => [seventh] => [eighth] => [ninth] => [extra] => [r] => [h] => [e] => [outcome] => )

    If you think this is a bug, I can provide more details to help you duplicate the issue.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘PHP Warnings on event admin page’ is closed to new replies.