ThemeBoy/SportsPress

Undefined variable error after skipping the wizard during initial setup

Opened this issue · 1 comments

Repro steps:

  1. Do a fresh install
  2. Skip setup wizard
  3. Go to Venues
  4. Scroll down where the map is
  5. See undefined error

The problem is in lines such as this:

if ( ! is_numeric( $latitude ) || ! is_numeric( $longitude ) ) :

where if there are no venues, the used variables ($latitude, $longitude, $address) never get assigned.

I believe order of operations should be inverted. First assign a default value to the variables and then override with the last venue if possible.

I haven't checked if the same issue appears somewhere else, but probably.

Cheers

Hi there @Pupix ,

It should be fixed with the following commit:
404f9aa

Thanks,
Savvas