mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-04-05 21:01:35 +08:00
Merge pull request #6525 from kumards/patch-2
Incorrect data being returned for nonexistent primitive datatypes
This commit is contained in:
commit
074fa7974a
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user