mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-21 03:14:10 +08:00
Merge pull request #6525 from kumards/patch-2
Incorrect data being returned for nonexistent primitive datatypes
This commit is contained in:
@@ -38,7 +38,7 @@ namespace Orchard.Redis.Caching {
|
|||||||
public object Get<T>(string key) {
|
public object Get<T>(string key) {
|
||||||
var json = Database.StringGet(GetLocalizedKey(key));
|
var json = Database.StringGet(GetLocalizedKey(key));
|
||||||
if(String.IsNullOrEmpty(json)) {
|
if(String.IsNullOrEmpty(json)) {
|
||||||
return default(T);
|
return null;
|
||||||
}
|
}
|
||||||
return JsonConvert.DeserializeObject<T>(json);
|
return JsonConvert.DeserializeObject<T>(json);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user