• Resolved Mr Corkle

    (@mr-corkle)


    I’ve recently installed your latest beta version of Sportspress, and most of it is working well.

    However, when viewing players the page displays a PHP error for the file sp-core-functions.php at line 2911 stating that:
    1. the “placeholders” variable is undefined; and
    2. there is an invalid argument supplied for the foreach() function

    I don’t know if it is related, but I have had a look at the php file and it looks unusual in that the opening curly bracket { seems to be missing on line 2911 and is replaced with a colon. i.e.

    foreach($placeholders as $season_id => $season_data ):

    $team_id = sp_array_value($seasons_teams, $season_id, array() );

    This happens in a few other places in the file too.

    I am happy to do a reinstall the plugin to see if that works but please provide some guidance as to backing-up the teams, fixtures,players database.

    https://wordpress.org/plugins/sportspress/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author ThemeBoy

    (@themeboy)

    Hi there!

    Thanks for your feedback.

    It looks like the $placeholders array wasn’t initialized properly in the last version. We’ve fixed this for the next release 🙂

    Regarding the braces, it’s actually just a different coding style i.e.

    if ( $condition ):
    // do something
    endif;

    vs

    if ( $condition ) {
    // do something
    }

    I’ll let you know when the new update becomes available 🙂

    Thread Starter Mr Corkle

    (@mr-corkle)

    Great. Thanks for your prompt feedback.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Error at line 2911 : undefined placeholders variable’ is closed to new replies.