Skip to content

[FIX]Preventing Fatal Error on calling a member from a null object

Loïc Yabili requested to merge lyabs243/tiki:tiki-trackers-history into 20.x

Description

When trying to display the history of a Tracker Item that has already been deleted there was an error displayed: Fatal error: Uncaught Error: Call to a member function getConfiguration() on boolean in /var/www/html/lib/core/Tracker/Item.php:200 Stack trace: #0 /var/www/html/lib/core/Tracker/Item.php(88): Tracker_Item->canSeeOwn() #1 /var/www/html/tiki-tracker_view_history.php(23): Tracker_Item->canView() #2 {main} thrown in /var/www/html/lib/core/Tracker/Item.php on line 200

Steps to test

  1. Delete an existing Tracker Item
  2. Go to tiki-tracker_view_history.php?itemId= with itemId the id of deleted tracker item.

Expected result

It will show an error page with the message This tracker item either has been deleted or is not found..

Merge request reports