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

[5.0.0-beta.2] TypeError trim(): Argument #1 ($string) must be of type string, array given #1128

Closed
WHITE-developer opened this issue May 2, 2022 · 1 comment
Labels

Comments

@WHITE-developer
Copy link

WHITE-developer commented May 2, 2022

Description

When trying to create a FeedMe with a CSV file, a TypeError is throwen.

Steps to reproduce

  1. Create a feedme with a csv file
  2. Click save & continue
  3. TypeError is throw

Additional info

TypeError: trim(): Argument #1 ($string) must be of type string, array given in /var/www/html/vendor/craftcms/feed-me/src/datatypes/Csv.php:165

Stack trace:
#0 /var/www/html/vendor/craftcms/feed-me/src/datatypes/Csv.php(165): trim(Array)
#1 /var/www/html/vendor/craftcms/feed-me/src/datatypes/Csv.php(79): craft\feedme\datatypes\Csv->_isArrayEmpty(Array)
#2 /var/www/html/vendor/craftcms/feed-me/src/services/DataTypes.php(231): craft\feedme\datatypes\Csv->getFeed('https://static....', Object(craft\feedme\models\FeedModel), false)
#3 /var/www/html/vendor/craftcms/feed-me/src/models/FeedModel.php(202): craft\feedme\services\DataTypes->getFeedData(Object(craft\feedme\models\FeedModel), false)
#4 /var/www/html/vendor/craftcms/feed-me/src/controllers/FeedsController.php(88): craft\feedme\models\FeedModel->getFeedNodes()
#5 [internal function]: craft\feedme\controllers\FeedsController->actionElementFeed('2', NULL)
#6 /var/www/html/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#7 /var/www/html/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array)
#8 /var/www/html/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction('element-feed', Array)
#9 /var/www/html/vendor/craftcms/cms/src/web/Application.php(301): yii\base\Module->runAction('feed-me/feeds/e...', Array)
#10 /var/www/html/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction('feed-me/feeds/e...', Array)
#11 /var/www/html/vendor/craftcms/cms/src/web/Application.php(286): yii\web\Application->handleRequest(Object(craft\web\Request))
#12 /var/www/html/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest(Object(craft\web\Request))
#13 /var/www/html/web/index.php(24): yii\base\Application->run()
#14 {main}
  • Craft version: 4.0.0-RC2
  • PHP version:8.0.8
  • Database driver & version: MySQL 8.0.26
  • Plugins & versions: 5.0.0-beta.2
@brandonkelly
Copy link
Member

Thanks for reporting! Feed Me 5.0.1 is out now with a fix for this.

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

No branches or pull requests

2 participants