sourcebans-pp icon indicating copy to clipboard operation
sourcebans-pp copied to clipboard

Fix(installer): rare case where sql_version is not defined (#965)

Open Rushaway opened this issue 1 year ago • 3 comments

Description

Ensure $sql_version is defined, if not give it a default value of 0.0.0 to let the rest of code run and throw error to user.

Motivation and Context

#965

How Has This Been Tested?

Tested with the guys who have an issue on sbpp discord, and it's now sovled.

Screenshots (if appropriate):

Types of changes

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • [x] My code follows the code style of this project.
  • [ ] My change requires a change to the documentation.
  • [x] I have updated the documentation accordingly.
  • [x] I have read the CONTRIBUTING document.

Rushaway avatar Jun 03 '24 07:06 Rushaway

instead of 0.0.0 maybe we can throw a message ? cc @Hackmastr

Rushaway avatar Jun 03 '24 07:06 Rushaway

Hello,

Ideally, we should offer users the option to provide a version. Thanks.

Hackmastr avatar Jun 08 '24 18:06 Hackmastr

Not sure, this not the normal behaviour to can not retrieve the version info. At this place something is already wrong. Allowing the user to provde a version does not mean the connection to the database was succesfull.

Rushaway avatar Jun 11 '24 18:06 Rushaway