Problem/Motivation

I have used the latest version 1.0.5 which was released yesterday, but now it is not possible to visit /gantt view page :

The website encountered an unexpected error. Please try again later.
Error: Call to a member function id() on null in convert_gantt_data() (line 146 of modules/gantt/gantt.theme.inc).

Comments

coaston created an issue. See original summary.

avpaderno’s picture

Title: Call to a member function id() » Call to a member function id() on null in convert_gantt_data()

The code causing that error is the following one.

          foreach ($values as $value) {
            if (!empty($value->entity)) {
              $data[$group][$delta][$ganttField][] = $value->entity->id();
            }
          }
          // @todo remove later for multiuser.
          $data[$group][$delta][$ganttField] = $value->entity->id();

The last line accesses $value->entity->id() without first checking $value->entity isn't empty, like the other line does.

  • lazzyvn committed f6ec9c7 on 1.x
    Issue #3313171: Call to a member function id() on null in...
lazzyvn’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.