From 2eee184e296565b9070619d801ee6641f00be915 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Wed, 14 Sep 2016 13:54:33 -0700 Subject: [PATCH] CRM-17789 - CRM_Core_Form, CRM_Report_Form - Fix visibility of _options, _action There are a handful of places in the core codebase which pass around the `$form` and access `_action` or `_options`. This is pretty suspicious ... and invalid ... --- CRM/Core/Form.php | 16 ++++++++++++---- CRM/Report/Form.php | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/CRM/Core/Form.php b/CRM/Core/Form.php index f85032dd29..b8b35afdf8 100644 --- a/CRM/Core/Form.php +++ b/CRM/Core/Form.php @@ -67,16 +67,24 @@ class CRM_Core_Form extends HTML_QuickForm_Page { public $_defaults = array(); /** - * The options passed into this form + * (QUASI-PROTECTED) The options passed into this form + * + * This field should marked `protected` and is not generally + * intended for external callers, but some edge-cases do use it. + * * @var mixed */ - protected $_options = NULL; + public $_options = NULL; /** - * The mode of operation for this form + * (QUASI-PROTECTED) The mode of operation for this form + * + * This field should marked `protected` and is not generally + * intended for external callers, but some edge-cases do use it. + * * @var int */ - protected $_action; + public $_action; /** * Available payment processors. diff --git a/CRM/Report/Form.php b/CRM/Report/Form.php index ccbaea07be..a4838d4f9b 100644 --- a/CRM/Report/Form.php +++ b/CRM/Report/Form.php @@ -88,7 +88,7 @@ class CRM_Report_Form extends CRM_Core_Form { * * @var array */ - protected $_options = array(); + public $_options = array(); /** * By default most reports hide contact id. -- 2.25.1