[Skip to main content](#vessel-content)

#   PDF invoice plugin 5.2.21: "Call to a member function get() on null" on HikaShop

##

- **[Lumiga](/forum/user/31479-lumiga "View Lumiga's Profile")**
- [![Lumiga's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar31479.png)](/forum/user/31479-lumiga "View Lumiga's Profile") Topic Author
- [ Away](/forum/user/31479-lumiga)

Less More

- Posts: 640
- Thank you received: 26
-
-
-

1 hour 17 minutes ago [\#100000709](#100000709) by [Lumiga](/forum/user/31479-lumiga "View Lumiga's Profile")  *[PDF invoice plugin 5.2.21: "Call to a member function get() on null" on HikaShop](/forum/25-install-update/100000146-pdf-invoice-plugin-5-2-21-call-to-a-member-function-get-on-null-on-hikashop#100000709 "-- HikaShop version -- : 6.8.2 -- Joomla version -- : 6.2.1 -- Browser(s) name and version -- : Chrome 156.0 -- Error-message(debug-mod must be tuned on) -- : Call to a member function get() on null JROOT/plugins/hikashop/attachinvoice/attachinvoice.php:59 plgHikashopAttachinvoice-&gt;&#95;&#95;construct() - hikashop&#95;import() administrator/components/com&#95;hikashop/helpers/helper.php:757 listing() administrator/components/com&#95;hikashop/views/plugins/view.html.php:147  Dear HikaShop team,  After updating to PDF invoice plugin 5.2.21, opening HikaShop &gt; System &gt; Plugins gives a fatal error:  Call to a member function get() on null JROOT/plugins/hikashop/attachinvoice/attachinvoice.php:59 plgHikashopAttachinvoice-&gt;&#95;&#95;construct()   - hikashop&#95;import() administrator/components/com&#95;hikashop/helpers/helper.php:757   listing() administrator/components/com&#95;hikashop/views/plugins/view.html.php:147  Cause: Line 59 in the constructor reads the plugin parameters:    self::$zeroVatSupply = (string)$this-&gt;params-&gt;get('zero&#95;vat&#95;supply', 'services');  When the plugin is instantiated through hikashop&#95;import() on the plugins listing, no params are passed to the constructor, so $this-&gt;params is null and the page crashes.  Fix (tested on our site):    self::$zeroVatSupply = $this-&gt;params ? (string)$this-&gt;params-&gt;get('zero&#95;vat&#95;supply', 'services') : 'services';  With this null check the plugins page opens normally again. Could you include this fix in the next release, so it isn't lost when we update the plugin?  Kind regards, Lumiga")* was created by *[Lumiga](/forum/user/31479-lumiga "View Lumiga's Profile")*

-- HikaShop version -- : 6.8.2
-- Joomla version -- : 6.2.1
-- Browser(s) name and version -- : Chrome 156.0
-- Error-message(debug-mod must be tuned on) -- : Call to a member function get() on null
JROOT/plugins/hikashop/attachinvoice/attachinvoice.php:59
plgHikashopAttachinvoice-&gt;__construct() - hikashop_import() administrator/components/com_hikashop/helpers/helper.php:757 listing() administrator/components/com_hikashop/views/plugins/view.html.php:147

Dear HikaShop team,

After updating to PDF invoice plugin 5.2.21, opening HikaShop &gt; System &gt; Plugins gives a fatal error:

Call to a member function get() on null
JROOT/plugins/hikashop/attachinvoice/attachinvoice.php:59
plgHikashopAttachinvoice-&gt;__construct()
  &lt;- hikashop_import() administrator/components/com_hikashop/helpers/helper.php:757
  &lt;- PluginsViewPlugins-&gt;listing() administrator/components/com_hikashop/views/plugins/view.html.php:147

Cause:
Line 59 in the constructor reads the plugin parameters:

  self::$zeroVatSupply = (string)$this-&gt;params-&gt;get('zero_vat_supply', 'services');

When the plugin is instantiated through hikashop_import() on the plugins listing, no params are passed to the constructor, so $this-&gt;params is null and the page crashes.

Fix (tested on our site):

  self::$zeroVatSupply = $this-&gt;params ? (string)$this-&gt;params-&gt;get('zero_vat_supply', 'services') : 'services';

With this null check the plugins page opens normally again. Could you include this fix in the next release, so it isn't lost when we update the plugin?

Kind regards,
Lumiga

---

Kind regards,
Lumiga

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzEwMDAwMDE0Ni1wZGYtaW52b2ljZS1wbHVnaW4tNS0yLTIxLWNhbGwtdG8tYS1tZW1iZXItZnVuY3Rpb24tZ2V0LW9uLW51bGwtb24taGlrYXNob3A/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.042 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
