Homec4science

Fix two bugs with Config's Edit controller.

Authored by Ricky Elrod <ricky@elrod.me> on Dec 30 2012, 15:15.

Description

Fix two bugs with Config's Edit controller.

Summary:

  • When we restored to the default value, we did, in fact delete the row from the database, but then a few lines later down, we saved it again. This patch causes the controller to return early on delete, like it was supposed to do to begin with.
  • When checking the user's input value for null (since PHP's JSON encoder will return null on failure), check the value that the user gave, not the value that we default to (which is often null anyway). Oops.

Test Plan:

  • Saved an empty text field and saw the delete work properly and NOT get re-added.
  • Put null in the text field, and saved successfully.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4300

Details

Committed
epriestley <git@epriestley.com>Dec 30 2012, 15:15
Pushed
aubortJan 31 2017, 17:16
Parents
rPH250fe7fb7724: Fix tokenizer placeholder issue
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH908253f1db01: Fix two bugs with Config's Edit controller. (authored by Ricky Elrod <ricky@elrod.me>).Dec 30 2012, 15:15