Fix #1957 - WhatLanguage can return null. Fallback to 'en' (#1959)

master
Eugen 8 years ago committed by GitHub
parent 8f2ed79a0b
commit 8ebed7fc68
  1. 2
      app/services/post_status_service.rb

@ -53,7 +53,7 @@ class PostStatusService < BaseService
end end
def detect_language(text) def detect_language(text)
WhatLanguage.new(:all).language_iso(text) WhatLanguage.new(:all).language_iso(text) || 'en'
end end
def process_mentions_service def process_mentions_service

Loading…
Cancel
Save