PrestaShop / PrestaShop

PrestaShop is the universal open-source software platform to build your e-commerce solution.
https://www.prestashop-project.org/
Other
7.85k stars 4.74k forks source link

NPE when downloading credit slip for shipping only #36130

Closed fire2 closed 2 weeks ago

fire2 commented 3 weeks ago

Prerequisites

Describe the bug and add attachments

When trying to download a credit slip where only the shipping was reimbursed, a NPE exception is thrown.

PrestaShop\PrestaShop\Core\Util\Sorter::natural0:Argument#1(Sarray) must be of type array, null given, called in
/public_html/classes/pdf/HTMLTemplateOrderSlip.phponline167

Expected behavior

The credit slip can be downloaded just fine.

Steps to reproduce

  1. Refund just the shipping for an order (no products)
  2. Go to "Credit slips" and try to download the generated credit slip
  3. You get the NPE

PrestaShop version(s) where the bug happened

8.1.4

PHP version(s) where the bug happened

No response

If your bug is related to a module, specify its name and its version

No response

Your company or customer's name goes here (if applicable).

No response

florine2623 commented 2 weeks ago

Hello @fire2 ,

I can't reproduce your issue :

https://github.com/PrestaShop/PrestaShop/assets/16019289/82434421-96f9-4f17-ac2f-82b2638656dd

We use GitHub issues only to discuss about bugs and new features in the PrestaShop project. If you need support, you can find resources to help you on this page: Get help with PrestaShop.

Alternatively, you can also ask for help in the community forums or in the public Slack channel.

Thank you

fire2 commented 2 weeks ago

You're not even using the same PS version reported.

Note to self: there's no point in reporting bugs.