Prevent getItem from clearing $item->params

Additional check added to params test to ensure that if parent::getItem values are not removed if present.
This commit is contained in:
Michael Richey 2017-11-24 01:22:17 -06:00 committed by GitHub
parent 8c2618b691
commit 9760ac86a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,7 +82,7 @@ class ###Component###Model###View### extends JModelAdmin
{###LICENSE_LOCKED_CHECK###
if ($item = parent::getItem($pk))
{
if (!empty($item->params))
if (!empty($item->params) && !is_array($item->params))
{
// Convert the params field to an array.
$registry = new Registry;