"Leider etwas schiefgelaufen" bei nachträglichem Hinzufügen einer Variante

Hallo zusammen!

Leider bekomme ich bei dieser Variante eine Fehlermeldung: https://www.cnc-zubehoer.eu/ESUN-3D-Drucker-Filament-ABS/ABSP.1.75.2.5k.sw

[2023-07-01T09:25:18.294610+00:00] php.CRITICAL: Uncaught Error: get_class(): Argument #1 ($object) must be of type object, null given {„exception“:„[object] (TypeError(code: 0): get_class(): Argument #1 ($object) must be of type object, null given at /var/www/vhosts/cnc-zubehoer.eu/httpdocs/vendor/shopware/core/Framework/Struct/Collection.php:243)“}
[2023-07-01T09:25:18.295556+00:00] request.CRITICAL: Uncaught PHP Exception TypeError: „get_class(): Argument #1 ($object) must be of type object, null given“ at /var/www/vhosts/cnc-zubehoer.eu/httpdocs/vendor/shopware/core/Framework/Struct/Collection.php line 243 {„exception“:„[object] (TypeError(code: 0): get_class(): Argument #1 ($object) must be of type object, null given at /var/www/vhosts/cnc-zubehoer.eu/httpdocs/vendor/shopware/core/Framework/Struct/Collection.php:243)“}

Das ist eine Variante, die ich im Nachhinein hinzugefügt habe. Wenn ich die Variante bearbeite, finde ich keine Felder, bei denen noch irgendetwas fehlen sollte.

Wenn ich in den Quellcode schaue, ist die Zeile 243: $elementClass = \get_class($element);
Damit kann ich auch nicht viel anfangen.

    /**
     * @param TElement $element
     */
    protected function validateType($element): void
    {
        $expectedClass = $this->getExpectedClass();
        if ($expectedClass === null) {
            return;
        }

        if (!$element instanceof $expectedClass) {
            $elementClass = \get_class($element);

            throw new \InvalidArgumentException(
                sprintf('Expected collection element of type %s got %s', $expectedClass, $elementClass)
            );
        }
    }

Hat jemand einen Hinweis für mich, wo ich noch suchen könnte? Vielen lieben Dank!

Viele Grüße,

Tobias

1 „Gefällt mir“