We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2132d6 commit 7e4dd2dCopy full SHA for 7e4dd2d
1 file changed
factory/ideas.php
@@ -741,8 +741,10 @@ public function submit($data)
741
$idea_id = $this->insert_idea_data($sql_ary, $this->table_ideas);
742
743
// Initial vote
744
- $idea = $this->get_idea($idea_id);
745
- $this->vote($idea, $data['poster_id'], 1);
+ if (($idea = $this->get_idea($idea_id)) !== false)
+ {
746
+ $this->vote($idea, $data['poster_id'], 1);
747
+ }
748
749
return $idea_id;
750
}
0 commit comments