When working with promotions and embedding a Price element in an ajax form, I was getting exceptions. This is due to a "null" amount value with missing currency code.

Adding two empty checks mitigated this.

-    if ($input !== FALSE && $input !== NULL) {
+    if ($input !== FALSE && $input !== NULL && !empty($input['amount']) && !empty($input['currency_code'])) {
CommentFileSizeAuthor
#2 price_element-2793211-2.patch656 bytesmglaman

Comments

mglaman created an issue. See original summary.

mglaman’s picture

Status: Active » Needs review
StatusFileSize
new656 bytes

  • mglaman committed ebf3b38 on 8.x-2.x
    Issue #2793211 by mglaman: Price element valueCallback needs to ensure...
mglaman’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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