craftcms / feed-me

Craft CMS plugin for importing entry data from XML, RSS or ATOM feeds—routine task or on-demand.
Other
286 stars 139 forks source link

TypeError when trying to import delimited string on PHP 8.1.18 #1308

Closed meinhard-meintjes closed 1 year ago

meinhard-meintjes commented 1 year ago

Description

Feedme seems to have an issue when exploding delimited string values like "filename1.jpg|filename2.jpg" when using PHP 8.1.18. I get an error "TypeError: array_merge(): Argument #1 must be of type array, null given" in DataHelper.php::89 If, in DataHelper.php::65, I change the default value of $value to [], then it works as expected.

Steps to reproduce

  1. Use PHP 8.1.18
  2. Install Feedme
  3. Set up a feed that contains a string field (containing delimited filenames with extension) delimited by custom delimiter like '|' (e.g. "filename1.jpg|filename2.jpg")
  4. Import feed

Additional info

i-just commented 1 year ago

Hi, thanks for reaching out. Looks like a duplicate of #1298 (fixed for the next release), so I’m going to close this one. You can follow along on the initial report!

meinhard-meintjes commented 1 year ago

Hi, thanks for reaching out. Looks like a duplicate of #1298 (fixed for the next release), so I’m going to close this one. You can follow along on the initial report!

Sorry, you're right. Thanks!