Skip to content
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

[regression] Fix error on no MIME type #17265

Merged
merged 1 commit into from
May 13, 2020

Conversation

MegaphoneJon
Copy link
Contributor

I have a regression from #16436. It's in my logs, so I don't know how to replicate it, but it seems easy to fix.

Since upgrading to 5.25.0 I've been seeing this error:

TypeError: Argument 1 passed to MimeTyper\Repository\AbstractRepository::setFromMap() must be of the type array, null given, called in /var/local/mysite.org/sites/all/modules/civicrm/vendor/adrienrn/php-mimetyper/src/Repository/MimeDbRepository.php on line 52 in MimeTyper\Repository\AbstractRepository->setFromMap() (line 18 of /var/local/mysite.org/sites/all/modules/civicrm/vendor/adrienrn/php-mimetyper/src/Repository/AbstractRepository.php

@civibot
Copy link

civibot bot commented May 8, 2020

(Standard links)

@civibot civibot bot added the 5.26 label May 8, 2020
@seamuslee001
Copy link
Contributor

Change seems fine to me merging

@seamuslee001 seamuslee001 merged commit 72f27d3 into civicrm:5.26 May 13, 2020
MegaphoneJon referenced this pull request Aug 6, 2020
…the mime-type supplied and use mime-type from db if supplied with an fid and eid

Switch to different libary that is php5.6 compatable
@KarinG
Copy link
Contributor

KarinG commented Oct 4, 2020

@seamuslee001 - I'm still seeing this in 5.27.5 ESR - even though it looks like this fix went into 5.26?

TypeError: Argument 1 passed to MimeTyper\Repository\AbstractRepository::setFromMap() must be of the type array, null given, called in /sites/all/modules/civicrm/vendor/adrienrn/php-mimetyper/src/Repository/MimeDbRepository.php on line 52 in MimeTyper\Repository\AbstractRepository->setFromMap() (line 18 of /sites/all/modules/civicrm/vendor/adrienrn/php-mimetyper/src/Repository/AbstractRepository.php).

@bryan-skvare
Copy link

Just noting that we also saw this issue in 5.27.7.

Notes from our development team:

At location ' /sites/all/modules/civicrm/vendor/adrienrn/php-mimetyper/ ' there must be a file ' /node_modules/mime-db/db.json' present. However in the .gitignore CiviCRM has ignored the '/node_module' directory. So due this ignore this db.json file was not pushed & it was missing on server. So we just pushed it on server and removed the entry from .gitignore

@MegaphoneJon
Copy link
Contributor Author

@bryan-skvare That's correct. That same fix is in Civi 5.31: #18673

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants