about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
authorEugen <eugen@zeonfederated.com>2017-04-16 23:12:19 +0200
committerGitHub <noreply@github.com>2017-04-16 23:12:19 +0200
commit8ebed7fc68bed3e3a1327294588ec234ff5b2482 (patch)
tree761c12887eeae58040feb37cd405e09666abe283 /app/services
parent8f2ed79a0b25db547020c0e0b664a94d6bee1c8f (diff)
Fix #1957 - WhatLanguage can return null. Fallback to 'en' (#1959)
Diffstat (limited to 'app/services')
-rw-r--r--app/services/post_status_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb
index d8202bea8..ec2b90e07 100644
--- a/app/services/post_status_service.rb
+++ b/app/services/post_status_service.rb
@@ -53,7 +53,7 @@ class PostStatusService < BaseService
   end
 
   def detect_language(text)
-    WhatLanguage.new(:all).language_iso(text)
+    WhatLanguage.new(:all).language_iso(text) || 'en'
   end
 
   def process_mentions_service