HostingPlatformGitForm constructor doesn't initialize the platform property correctly

Created on 11 November 2024, 4 days ago

Problem/Motivation

Spot the potential problem:


public function __construct(&$form, &$form_state, &$node = FALSE) {
    parent::__construct($form, $form_state, $node);
    if ($this->node->type == 'platform') {
      $this->platform = new HostingPlatformGitNode($node);
    }
  }

Yes, that's right dear viewer, we check if ($this->node->type == 'platform') { and then use $node to pass that into our HostingPlatformGitNode wrapper.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇬🇧United Kingdom steven jones

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024