joomla/joomla-cms — pull request #3589 by whbean (2014-05-12 16:17:26+00:00)
Title: Update default.php to gracefully handle templates with no xml data 

The Hathor template manager fails to display the 'Templates' tab if the site contains a template without xml data (in my case ja_purity). The problem occurs because this file tries to access $this->xmldata->get('version') without checking whether it is null. My proposed fix tests for the case of null xmldata and creates a new object with the required fields. In the case where the xmldata exists, the change creates a cloned object and ensures that the required fields aren't null.

Further down in the code, we access $xmldata, the new object, rather than $item->xmldata.