Reply to thread

The Arr::stringToArray is used on potentially nullable inputs, but trim requires non-null inputs as of php 8.1



An example of triggering this is;

[CODE="php"]                    /** @var \XF\Entity\ChangeLog $changeLog */

                    $changeLog = \XF::em()->create('XF:ChangeLog');

                    $changeLog->content_type = 'user';

                    $changeLog->content_id = 1;

//                    $changeLog->old_value = '';

                    $changeLog->new_value = implode(',', $intersect);

                    $changeLog->field = 'secondary_group_ids';

                    $changeLog->preSave();

// the next line will error because old_value  is null

                    $changeLog->getDisplayEntry();[/CODE]


Back
Top Bottom