diff --git a/script/import_scripts/phpbb3/database/database_3_0.rb b/script/import_scripts/phpbb3/database/database_3_0.rb index e06d8f7ba5f..b25395abad2 100644 --- a/script/import_scripts/phpbb3/database/database_3_0.rb +++ b/script/import_scripts/phpbb3/database/database_3_0.rb @@ -86,7 +86,7 @@ module ImportScripts::PhpBB3 end def get_first_post_id(topic_id) - query(<<-SQL).first[:topic_first_post_id] + query(<<-SQL).try(:first).try(:[], :topic_first_post_id) SELECT topic_first_post_id FROM #{@table_prefix}_topics WHERE topic_id = #{topic_id}