dev/core#1636 - In system status check avoid E_NOTICEs for smart groups that don't have form_values[0] #16707
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
In some installs where smart groups are defined differently, you get
Undefined index 0 line 109 in CRM/Utils/Check/Component/Schema.php
when first logging in. They also happen on the system status page but you don't see them there because they get snippet'd out, but they appear in drupal watchdog.Related lab tickets:
Technical Details
In PR #16267 a check for deleted custom fields in smart groups was added. For whatever reason, as also addressed in #16417, some smart groups don't have a
form_values[0]
, so you get undefined index notices.I've just applied the same fix/workaround as in #16417
Comments
Started in 5.23 so have based against 5.24. It's just a system status check so not sure it needs to be backported, although you see the notices every time you log in.
FYI @jitendrapurohit @jmcclelland