Skip to content

Commit

Permalink
Fix ConditionalizableTrait
Browse files Browse the repository at this point in the history
Replaced `unset()` with NULL assignment to preserve the class property.
  • Loading branch information
mcaskill committed Jan 16, 2020
1 parent 7a4b4b4 commit fcffd20
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Charcoal/Ui/ConditionalizableTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function setCondition($condition)
);
}

unset($this->resolvedCondition);
$this->resolvedCondition = null;
$this->condition = $condition;
return $this;
}
Expand Down Expand Up @@ -105,6 +105,8 @@ final protected function parseConditionalLogic($condition)
/**
* Parse the widget's conditional logic.
*
* @todo Simplify logic by moving `form()` method lookup to relevant form widget.
*
* @param callable|string $condition The callable or renderable condition.
* @return boolean
*/
Expand Down

0 comments on commit fcffd20

Please sign in to comment.