Error loop: Facade\Ignition\Exceptions\ViewException array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead

Hello!

I'm getting this error over a loop.

Facade\Ignition\Exceptions\ViewException
array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead

http://domain.test/shop/headwear/5-panel-logo-camper-hat 

Stack trace says this file: resources/views/product/_related_products.antlers.html

which looks like:

{{ if show_related_products }}
<section class="max-w-7xl sm:px-6 grid grid-cols-12 gap-5 px-4 mx-auto my-10">
    <div class="col-span-12">
        <h1 class="font-sans text-3xl font-semibold">
            Customers like you also bought:
        </h1>
    </div>
    {{ if selected_related_products }}
        {{ selected_related_products }}
           {{ title }}
        {{ /selected_related_products }}
    {{ else }}
        {{ collection:products limit="3" }}
            {{ title }}
        {{ /collection:products }}
    {{ /if }}
</section>
{{ /if }}

Note: Originally there was a partial inside those loops, but it throws the error with nothing or the partial in them. So for brevity I remove them. Also I've tested moving the loops outside the if conditionals, and still get the error.

Product example:

---
id: 96501107-794a-46b4-93bb-02ab11c11870
blueprint: product
product_id: 6547894501556
published_at: '2021-05-31 17:44:00'
title: '5 Panel Logo Camper Hat'
vendor:
  - rainier-watch-test
product_type:
  - headwear
product_tags:
  - headwear
  - image-too-large
  - import_2021_03_05_001704
  - joined-description-fields
  - validate-product-description
featured_image: shopify/mockup-5562ab86.png
gallery:
  - shopify/mockup-5562ab86-1622483054.png
type:
  - headwear
tags:
  - headwear
  - image-too-large
  - import_2021_03_05_001704
  - joined-description-fields
  - validate-product-description
show_related_products: true
selected_related_products:
  - 6c92c50b-31ea-42d9-992f-f7d988339441
  - f84aa4f6-0bd0-49b5-913d-fb7b1a84af6f
  - dd7b3520-903c-4b71-80cf-dde8ba0fd1cf
updated_by: 6bbb8ea9-e8f0-4906-9f24-af95d70f961c
updated_at: 1624539959
---
<p>Channel your inner hipster or camper on any adventure. Our logo is embroidered on this low profile 5 panel cap. Comfortable and classic!</p><br>--<br><p>• Every purchase helps support Washington's National Parks via <a href="https://wnpf.org">Washington's National Parks Fund</a><br>• Made in the PNW
<br>• 100% cotton
<br>• Soft-structured
<br>• Five panel
<br>• Low profile
<br>• Metal eyelets
<br>• Nylon strap clip closure</p>

  • PHP 7.4.3
  • Statamic version: 3.1.24
>>>>>>> Unanswered <<<<<<<
3 Replies
2 Followers