If the order item has no fields there is a PHP notice:

Notice: Undefined index: fields in Drupal\commerce_webform_order\Plugin\WebformHandler\CommerceWebformOrderHandler->prepareData() (line 875 of modules/contrib/commerce_webform_order/src/Plugin/WebformHandler/CommerceWebformOrderHandler.php).

Comments

aleksip created an issue. See original summary.

aleksip’s picture

StatusFileSize
new1.18 KB

This patch adds a simple isset check.

jigish.addweb’s picture

Status: Active » Needs review
StatusFileSize
new1.3 KB

@aleksip, In the attached patch I Added the additional condition checks to verify the error solution, kindly review it & let me know if the patch doesn't works.

Thanks

Status: Needs review » Needs work

The last submitted patch, 3: CommerceWebformOrderHandler.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

aleksip’s picture

@jigish.addweb Tested your patch and it works for me. Would be good to apply the codesniffer_fixes.patch.

aleksip’s picture

StatusFileSize
new1.3 KB

Here is the patch with Code Sniffer fixes applied.

aleksip’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 6: 3046884-6.patch, failed testing. View results

  • facine committed d9b345c on 8.x-1.x authored by aleksip
    Issue #3046884 by aleksip, jigish.addweb, facine: Fix PHP notice if...
facine’s picture

Status: Needs work » Fixed

Thanks! Fixed, please download and review the latest dev release.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.