User tests: Successful: Unsuccessful:
Pull Request for Issue #40681 .
Separate conditions of the if statement to apply to new fields vs existing fields accordingly.
When creating a new field and the Search Index
setting is Don't make searchable
, the last 2 conditions are not applicable thus php warnings.
PHP Warning: Attempt to read property "params" on null in \administrator\components\com_fields\src\Model\FieldModel.php on line 123
PHP Warning: Trying to access array offset on value of type null in \administrator\components\com_fields\src\Model\FieldModel.php on line 123
Install Blog Sample Data.
No errors in PHP log.
Add a new custom field.
Save field.
No errors in PHP log.
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_fields |
Labels |
Added:
bug
PR-5.1-dev
|
I have tested this item ✅ successfully on 51b02c0
I was able to test this successfully - tested every field type - no error log entries.
Try as I may, I could not get these errors even before the patch.
I have tested this item ✅ successfully on 51b02c0
Status | Pending | ⇒ | Ready to Commit |
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-05-11 19:56:07 |
Closed_By | ⇒ | bembelimen | |
Labels |
Added:
RTC
|
Thx
Three times nested if conditions do look for me as not the right fix. Probably adding some comments to the existing one would be a better solution.