-
Notifications
You must be signed in to change notification settings - Fork 170
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
InvalidArgumentException: Options must be an array. #897
Comments
I've narrowed this done some more - the error specifically occurs when using {{ order.totalPrice }} in a template eg: |
This error is now occurring when I try to update a user who has Commerce transactions in the cPanel. It prevents me from being able to do any updates to the user
|
Can you please send your pre-updated database and post updated database backups to support@craftcms.com and I will take a look. |
Have emailed DBs |
Issue does not seem to happen on commerce v.2.1.6.1. I suspect something was introduced in v2.1.7 but dont know enough about the ecosystem to debug in more detail. Maybe a migration did not run correctly? Function setOptions on Line 188 in craft/vendor/craftcms/commerce/src/models/LineItem.php Based on my assumption that null should be [], I added another if to the start of the function which seems to solve the issue for now.
|
Description
I upgraded from Craft 2 & Commerce 1 to Craft 3 & Commerce 2. Everything seemed to be going well, but as I started working through the eCommerce templates to fix the deprecation errors, I started running into the following error:
[error][Twig\Error\RuntimeError] yii\base\InvalidArgumentException: Options must be an array. in /usr/home/abcdefg/craft/vendor/craftcms/commerce/src/models/LineItem.php:193
This error is displayed whenever I attempt to list orders using the following template code:
{% set orders = craft.orders.customer(craft.commerce.customers.customer).isCompleted(true).all() %} {% if orders | length %} {% for order in orders %} ........ {% endfor %} {% endif %}
I also receive the error when attempting to browse the order listing in the Cpanel
Steps to reproduce
[error][Twig\Error\RuntimeError] yii\base\InvalidArgumentException: Options must be an array. in /usr/home/abcdefg/craft/vendor/craftcms/commerce/src/models/LineItem.php:193
-- Alternatively ---
Additional info
Calendar 2.0.20
Craft Commerce 2.1.6.1
Imager v2.1.10
Redactor 2.3.3.2
Site Switcher 2.1.0
The text was updated successfully, but these errors were encountered: