PHP8: media_library: Argument #1 ($value) must be of type Countable

Created on 29 October 2021, almost 3 years ago
Updated 26 June 2024, 2 months ago

TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in count() (line 195 of /var/www/html/web/core/modules/media_library/src/Form/FileUploadForm.php)

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component
MediaΒ  β†’

Last updated less than a minute ago

Created by

πŸ‡§πŸ‡ͺBelgium michiellucas

Live updates comments and jobs are added and updated live.
  • PHP 8.1

    The issue particularly affects sites running on PHP version 8.1.0 or later.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    Same issue here now with PHP 8.1

  • Status changed to Active over 1 year ago
  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    This message already pops up for me when opening the modal with the file upload widget on top and the media selection table below. At that point no file has been uploaded.

    So it looks to me, as if the patch was needed or the code has to be adjusted?

    It might be related to the other issue in some cases, but doesn't have to, I guess.

    See screenshot below:

  • First commit to issue fork.
  • Pipeline finished with Canceled
    2 months ago
    Total: 55s
    #208754
  • Pipeline finished with Success
    2 months ago
    Total: 479s
    #208759
  • Pipeline finished with Failed
    2 months ago
    Total: 180s
    #208867
  • Pipeline finished with Failed
    2 months ago
    Total: 570s
    #208871
Production build 0.71.5 2024