From e3f6b40c8b975d39d677f995e9dc08419c831284 Mon Sep 17 00:00:00 2001 From: Mike Dickson Date: Mon, 7 Aug 2023 17:28:20 -0400 Subject: [PATCH] Fix for exception when reading classifieds in the profile module. Category is a varchar string in the database but was treated as an int. Changed the code to call System.Convert.ToInt32 which will handle an object and convert correctly regardless of the table type. This way the same code should work on core or on a database where the database Category has been migrated to an int. Bumped version to 8619 --- OpenSim/Data/MySQL/MySQLUserProfilesData.cs | 2 +- OpenSim/Framework/VersionInfo.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenSim/Data/MySQL/MySQLUserProfilesData.cs b/OpenSim/Data/MySQL/MySQLUserProfilesData.cs index c4330091da6..05f33368a8b 100644 --- a/OpenSim/Data/MySQL/MySQLUserProfilesData.cs +++ b/OpenSim/Data/MySQL/MySQLUserProfilesData.cs @@ -288,7 +288,7 @@ public bool GetClassifiedInfo(ref UserClassifiedAdd ad, ref string result) ad.ExpirationDate = Convert.ToInt32(reader["expirationdate"]); ad.ParentEstate = Convert.ToInt32(reader["parentestate"]); ad.Flags = (byte)reader.GetUInt32("classifiedflags"); - ad.Category = reader.GetInt32("category"); + ad.Category = Convert.ToInt32(reader["category"]); ad.Price = reader.GetInt16("priceforlisting"); ad.Name = reader.GetString("name"); ad.Description = reader.GetString("description"); diff --git a/OpenSim/Framework/VersionInfo.cs b/OpenSim/Framework/VersionInfo.cs index e7ef41eb807..e5b85474cb2 100644 --- a/OpenSim/Framework/VersionInfo.cs +++ b/OpenSim/Framework/VersionInfo.cs @@ -39,7 +39,7 @@ public class VersionInfo { public const string VersionNumber = "0.9.2.2"; public const string AssemblyVersionNumber = "0.9.2.2"; - public const string Release = "8617"; + public const string Release = "8619"; public const Flavour VERSION_FLAVOUR = Flavour.Dev;