SportsPress icon indicating copy to clipboard operation
SportsPress copied to clipboard

Undefined variable error after skipping the wizard during initial setup

Open Pupix opened this issue 7 months ago • 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: https://github.com/ThemeBoy/SportsPress/blob/e477522a1aee0aa4fd6091666ef1df8a67342852/includes/admin/class-sp-admin-taxonomies.php#L111 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

Pupix avatar Jul 15 '24 16:07 Pupix