- ๐ฎ๐ณIndia sahilgidwani Jaipur
I am reopening this issue, as I am getting warnings and errors, as mentioned in the descriptions in version 9.5.9 and PHP 8.
- ๐จ๐ฆCanada No Sssweat
After upgrading from PHP 7.4 to 8.1
I am also seeing the type error and the array flip warning that comment #5 mentions with Drupal 9.5.11
TypeError: Illegal offset type in Drupal\Core\Entity\ContentEntityStorageBase->loadRevision() (line 636 of /var/www/html/web/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php)
Warning: array_flip(): Can only flip string and integer values, entry skipped in Drupal\Core\Entity\ContentEntityStorageBase->loadMultipleRevisions() (line 667 of /var/www/html/web/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php)
Going through the code in xdebug for some reason with PHP 8.1 it triggers different kernel events compared to 7.4 with the same codebase and DB.
7.4 does a kernerl.response while 8.1 does a kernel.controller event.
Also 7.4 has more service definitions while 8.1 has less (802 vs 754)
- ๐จ๐ฆCanada No Sssweat
As mentioned in comment #6, because of the different kernel events. Different values end up being passed to the error and the warning lines.
One of these values is an empty revisions array and a node object as a revision id instead of a string or int.
This might not be the optimal solution, but I manage to get passed those by checking if it's not empty.
- last update
about 1 year ago 30,341 pass - ๐ฎ๐ณIndia samit.310@gmail.com
samit.310@gmail.com โ made their first commit to this issueโs fork.
- Status changed to Needs review
5 months ago 9:39am 2 August 2024 - Status changed to Needs work
5 months ago 3:05pm 2 August 2024 - ๐บ๐ธUnited States smustgrave
Think it needs to be determined why that's empty and findings be added to the issue summary. Just putting a simple check most likely could be masking a larger issue.