SportsPress
SportsPress copied to clipboard
Undefined variable error after skipping the wizard during initial setup
Repro steps:
- Do a fresh install
- Skip setup wizard
- Go to Venues
- Scroll down where the map is
- 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