From 8816f08765dfbf3aa746eb4998c3c825f103c33d Mon Sep 17 00:00:00 2001 From: vrana Date: Tue, 18 Dec 2012 16:11:07 -0800 Subject: [PATCH] Throw instead of log for invalid properties Summary: Continue work started at D3601. Test Plan: Commented declaration `AphrontController::$request`, saw exception. Brought it back, didn't see exception. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4233 --- src/__phutil_library_map__.php | 2 ++ src/aphront/AphrontController.php | 7 +------ src/view/AphrontView.php | 7 +------ 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index d660e79aee..921790611f 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -1361,6 +1361,7 @@ phutil_register_library_map(array( 'AphrontCalendarEventView' => 'AphrontView', 'AphrontCalendarMonthView' => 'AphrontView', 'AphrontContextBarView' => 'AphrontView', + 'AphrontController' => 'Phobject', 'AphrontCrumbsView' => 'AphrontView', 'AphrontCursorPagerView' => 'AphrontView', 'AphrontDefaultApplicationConfiguration' => 'AphrontApplicationConfiguration', @@ -1422,6 +1423,7 @@ phutil_register_library_map(array( 'AphrontTokenizerTemplateView' => 'AphrontView', 'AphrontTypeaheadTemplateView' => 'AphrontView', 'AphrontUsageException' => 'AphrontException', + 'AphrontView' => 'Phobject', 'AphrontWebpageResponse' => 'AphrontHTMLResponse', 'CelerityPhabricatorResourceController' => 'CelerityResourceController', 'CelerityResourceController' => 'PhabricatorController', diff --git a/src/aphront/AphrontController.php b/src/aphront/AphrontController.php index 06aecedb5c..8f14270a67 100644 --- a/src/aphront/AphrontController.php +++ b/src/aphront/AphrontController.php @@ -3,7 +3,7 @@ /** * @group aphront */ -abstract class AphrontController { +abstract class AphrontController extends Phobject { private $request; private $currentApplication; @@ -45,9 +45,4 @@ abstract class AphrontController { return $this->currentApplication; } - public function __set($name, $value) { - phlog('Wrote to undeclared property '.get_class($this).'::$'.$name.'.'); - $this->$name = $value; - } - } diff --git a/src/view/AphrontView.php b/src/view/AphrontView.php index b1ac91f7f0..889059892e 100644 --- a/src/view/AphrontView.php +++ b/src/view/AphrontView.php @@ -1,6 +1,6 @@ $name = $value; - } - }