Smarty Call of php class function results in internal server error

I try to call get() function from Shopware\Bundle\StoreFrontBundle\Struct\Attribute in order to access storage variables but it does not work, 



none of the above functions work, however they are public functions, what is the problem here?

The get() will cause an exception, when there is no entry for this specific supplier in the s_articles_supplier_attributes table. You should add an IF-Statement like this:

{if $supplier.attributes.core}

There might be some old installations that are missing the entries, because this functionality was added with 5.2. You cann add an entry for every supplier via sql to fix this.

1 Like

[@Moritz Naczenski]( Naczenski “Moritz Naczenski”)‍ Thank you very much, I’ve added the if statement and it worked, so that means if you call a function on null it will throw an exception right?