Problem/Motivation
When viewing a task, a PHP error is thrown if the user entity does not have a field with machine name `user_picture`
Message Error: Call to a member function isEmpty() on null in Drupal\burndown\Entity\Task->getOwnerImage() (line 928 of /home/ide/project/docroot/modules/custom/burndown/src/Entity/Task.php)
#0 /home/ide/project/docroot/modules/custom/burndown/burndown_task.page.inc(45): Drupal\burndown\Entity\Task->getOwnerImage()Marking as minor priority because not many people actually use the minimal theme so odds of this cropping up should be low.
Steps to reproduce
Install a site using the minimal profile
Enable burndown, set up a project
Add a task
Observe 500 error thrown and message above appearing in log
Proposed resolution
Task::getOwnerImage() needs to check that the `user_picture` field exists before calling isEmpty() on the field.
Comments
Comment #2
jeremylichtman commentedI've pushed a commit with a fix for this.
Comment #3
jeremylichtman commentedComment #4
jeremylichtman commented