diff --git a/src/aphront/AphrontController.php b/src/aphront/AphrontController.php index 94f0071f18..8fc6a48d1d 100644 --- a/src/aphront/AphrontController.php +++ b/src/aphront/AphrontController.php @@ -61,4 +61,9 @@ 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/infrastructure/storage/lisk/LiskDAO.php b/src/infrastructure/storage/lisk/LiskDAO.php index 80f7ef051f..a1e65df2ac 100644 --- a/src/infrastructure/storage/lisk/LiskDAO.php +++ b/src/infrastructure/storage/lisk/LiskDAO.php @@ -1796,4 +1796,15 @@ abstract class LiskDAO { throw new Exception("Unable to resolve method '{$method}'."); } + + /** + * Warns against writing to undeclared property. + * + * @task util + */ + 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 99196f28e1..23807285a8 100644 --- a/src/view/AphrontView.php +++ b/src/view/AphrontView.php @@ -1,7 +1,7 @@ $name = $value; + } + }