Skip to content

Commit

Permalink
Fixing post publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
willdoran committed Aug 15, 2017
1 parent 3551b76 commit 8ce4d41
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion application/classes/Ushahidi/Validator/Post/Create.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ public function checkTags(Validation $validation, $tags)

public function checkValues(Validation $validation, $attributes, $fullData)
{

$attributes = !empty($fullData['values']) ? $fullData['values'] : [];
if (!$attributes)
{
return;
Expand Down Expand Up @@ -280,6 +282,7 @@ public function checkValues(Validation $validation, $attributes, $fullData)
*/
public function checkStageInForm(Validation $validation, $completed_stages, $fullData)
{
$completed_stages = !empty($fullData['completed_stages']) ? $fullData['completed_stages'] : [];
if (!$completed_stages)
{
return;
Expand All @@ -305,7 +308,7 @@ public function checkStageInForm(Validation $validation, $completed_stages, $ful
*/
public function checkRequiredStages(Validation $validation, $completed_stages, $fullData)
{
$completed_stages = $completed_stages ? $completed_stages : [];
$completed_stages = !empty($fullData['completed_stages']) ? $fullData['completed_stages'] : [];

// If post is being published
if ($fullData['status'] === 'published')
Expand Down

0 comments on commit 8ce4d41

Please sign in to comment.