Problem/Motivation

  1. Constructor of ctools_context_required class called incorrectly from ctools_context_optional class.
  2. Since we are progressive people and looking forward then let's get rid from obsolete var keyword.

Proposed resolution

  1. Use call_user_func_array() in ctools_context_optional::__construct().
  2. Replace/add public instead of var statements.

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

BR0kEN created an issue. See original summary.

BR0kEN’s picture

Status: Active » Needs review
FileSize
5.11 KB
Chris Matthews’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

The 3 year old patch to context.inc does not apply to the latest ctools 7.x-1.x-dev.

Checking patch includes/context.inc...
error: while searching for:
 * of the context is important.
 */
class ctools_context {
  var $type = NULL;
  var $data = NULL;
  // The title of this object.
  var $title = '';
  // The title of the page if this object exists
  var $page_title = '';
  // The identifier (in the UI) of this object
  var $identifier = '';
  var $argument = NULL;
  var $keyword = '';
  var $original_argument = NULL;
  var $restrictions = array();
  var $empty = FALSE;

  function __construct($type = 'none', $data = NULL) {
    $this->type  = $type;
    $this->data  = $data;
    $this->title = t('Unknown context');
  }

  function is_type($type) {
    if ($type == 'any' || $this->type == 'any') {
      return TRUE;
    }

error: patch failed: includes/context.inc:28
error: includes/context.inc: patch does not apply
MustangGB’s picture

Category: Support request » Bug report