HomePhorge

Fix two bugs with Config's Edit controller.

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

Provenance
Ricky ElrodAuthored on Dec 30 2012, 6:15 AM
epriestleyCommitted on Dec 30 2012, 6:15 AM
themackabuPushed on Mar 25 2025, 8:07 PM
Parents
rP250fe7fb7724: Fix tokenizer placeholder issue
Branches
Unknown
Tags
Unknown

Event Timeline