A platform for community discussion. Free, open, simple.
FIX: ensures shadow has last_posted_at before comparing to site setting (#10374)
Joffrey JAFFEUXb6e475a8f383
diff --git a/app/services/anonymous_shadow_creator.rb b/app/services/anonymous_shadow_creator.rbindex c5c4d873c12..385413feb58 100644--- a/app/services/anonymous_shadow_creator.rb+++ b/app/services/anonymous_shadow_creator.rb@@ -31,6 +31,7 @@ class AnonymousShadowCreatorshadow = user.shadow_userif shadow && (shadow.post_count + shadow.topic_count) > 0 &&+ shadow.last_posted_at &&shadow.last_posted_at < SiteSetting.anonymous_account_duration_minutes.minutes.agoshadow = nilend