diff --git a/bridges/NineGagBridge.php b/bridges/NineGagBridge.php index b5cab485..362bc9ed 100644 --- a/bridges/NineGagBridge.php +++ b/bridges/NineGagBridge.php @@ -304,7 +304,15 @@ class NineGagBridge extends BridgeAbstract { protected static function getCategories($post) { $params = self::PARAMETERS; $sections = $params['Sections']['g']['values']; - $postSections = $post['sections']; + + if(isset($post['sections'])) { + $postSections = $post['sections']; + } elseif (isset($post['postSection'])) { + $postSections = array($post['postSection']); + } else { + $postSections = array(); + } + foreach ($postSections as $key => $section) { $postSections[$key] = array_search($section, $sections); }