You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After turning on opcache+jit, after some time an error occurs: /var/www/backend/vendor/spatie/laravel-medialibrary/src/InteractsWithMedia.php:607 Only arrays and Traversables can be unpacked
Sometimes when opcache+jit is enabled, somehow $actualMediaConversions or $preparedMediaConversions are false, not array.
This happens only with singleFile collections.
I inherited this trait and overridden method with a quick fix.
Perhaps this is happening because I am using methods getRegisteredMediaCollections and getMediaCollection in custom attributes, and this registers the collections on every call $this->registerMediaCollections();
Also I tried to separate conversion to registerMediaConversions method, but the error still repeats.
izica
changed the title
php 8.3.4 opcache+jit error: Only arrays and Traversables can be unpacked
php 8.3.4 + laravel-medialibrary 11.4.5: opcache+jit error: Only arrays and Traversables can be unpacked
Mar 20, 2024
After turning on opcache+jit, after some time an error occurs:
/var/www/backend/vendor/spatie/laravel-medialibrary/src/InteractsWithMedia.php:607
Only arrays and Traversables can be unpacked
this only happens after some time(5+ mins of requests), when opcache+jit is enabled
in logs
$actualMediaConversions === false (only after opcache+jit)
Code and settings:
The text was updated successfully, but these errors were encountered: