From f557fc9caab1e0b8ed0b0dc4cdf564b1f0207de4 Mon Sep 17 00:00:00 2001 From: Alex Monk Date: Thu, 18 Feb 2016 09:54:47 -0800 Subject: [PATCH] Return 404 instead of undefined variable error when trying to edit a non-existent form Summary: E.g. https://phab-01.wmflabs.org/transactions/editengine/transactions.editengine.config/view/13/ Test Plan: * Go to /transactions/editengine/transactions.editengine.config/view/1000000/ * Observe error * Apply patch * Observe 404 Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D15307 --- .../transactions/controller/PhabricatorEditEngineController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/applications/transactions/controller/PhabricatorEditEngineController.php b/src/applications/transactions/controller/PhabricatorEditEngineController.php index b02bf8302f..d4b5e0e9f0 100644 --- a/src/applications/transactions/controller/PhabricatorEditEngineController.php +++ b/src/applications/transactions/controller/PhabricatorEditEngineController.php @@ -70,6 +70,8 @@ abstract class PhabricatorEditEngineController ->executeOne(); if ($config) { $engine = $config->getEngine(); + } else { + return null; } if (!$engine->isEngineConfigurable()) {