User tests: Successful: Unsuccessful:
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_users |
So we have 2 PRs for the same issue, this one and #38467 . While this here changes $result->rules
to an empty array when it is null, the other one leaves it as it is and just doesn't try to decode it. I'm not sure what's better, but I tend to think the other PR is better.
Most simple solution:
$result->rules = json_decode($result->rules ?? '{}');
since $result->rules
is expected to be an array afterwards.
And non of the solutions documents why this value could be empty.
I have tested this item
And non of the solutions documents why this value could be empty.
It is null because when we create a new level, getItem()
method from AdminModel
just return an object of that item with all fields from that table set to null. For reference :
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
Labels |
Added:
?
PHP 8.x
|
RTC
Labels |
Added:
?
|
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-01-08 12:59:47 |
Closed_By | ⇒ | fancyFranci |
Thanks, everybody
see #38467 too