# Smarty Call of php class function results in internal server error

**URL:** <https://forum.shopware.com/t/smarty-call-of-php-class-function-results-in-internal-server-error/53827>\
**Category:** International (English Only)\
**Created:** [2. Juli 2018 um 14:09 UTC](https://forum.shopware.com/t/smarty-call-of-php-class-function-results-in-internal-server-error/53827 "2018-07-02T14:09:22Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Moritz\_Naczenski](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/moritz_naczenski/32/7792_2.png) [@Moritz\_Naczenski](https://forum.shopware.com/u/Moritz_Naczenski)\
**Post date:** [2. Juli 2018 um 16:31 UTC](https://forum.shopware.com/t/smarty-call-of-php-class-function-results-in-internal-server-error/53827/2 "2018-07-02T16:31:04Z")

</div>

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}
{$supplier.attributes.core->get('attribute')}
{/if}

```

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.

---

_[View the full topic](https://forum.shopware.com/t/smarty-call-of-php-class-function-results-in-internal-server-error/53827)._
