Salesforce can return NULL for number fields indicating a blank value but casting NULL to an int or double sets it to 0. Patch to check for NULL and only cast if it's not NULL.

Comments

cwcorrigan created an issue. See original summary.

cwcorrigan’s picture

StatusFileSize
new750 bytes

Fix indentation

aaronbauman’s picture

Status: Needs review » Reviewed & tested by the community

LGTM

  • AaronBauman committed 2648090 on 8.x-4.x authored by cwcorrigan
    Issue #3154385 by cwcorrigan: Type Cast doesn't catch Null Correctly for...
aaronbauman’s picture

Status: Reviewed & tested by the community » Fixed

committed, thanks for the patch

Status: Fixed » Closed (fixed)

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