-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP8 issue with several tripal fields #116
Comments
Some other fields use something like this
This also causes WSOD on saving e.g. a gene (feature) with the |
And finally some fields do not do the initialization at all and cause a similar error, adding the initialization fixes this. |
P.S. Some of the non-functional widgets cause errors too, and since they can't work because of the missing |
Four tripal fields from this module in the
load()
function initialize the field with this code:$entity->{$field}['und'][0]['value'] = NULL;
When editing e.g. an organism and then saving, the
ero__nucleic_acid_library
field generates a white screen of deathThe website encountered an unexpected error. Please try again later.
and the first error in the log is
Warning: foreach() argument must be of type array|object, null given in tripal_chado_field_storage_write_table() (line 185 of .../sites/all/modules/tripal/tripal_chado/includes/tripal_chado.field_storage.inc).
PHP8 is more strict about things, the problem can be resolved by changing the initialization code to
$entity->{$field}['und'][0]['value'] = [];
The text was updated successfully, but these errors were encountered: