AnsweredAssumed Answered

v7.9.3 PdfManagerHelper::parseBeanFields not working on integers

Question asked by Francesca Shiekh on Jan 3, 2018
Latest reply on Jan 5, 2018 by Francesca Shiekh

Has anyone else noticed that PdfManagerHelper::parseBeanFields will not return any integer fields?


I am in the process of upgrading to 7.9.3 and found that some of my custom PDFs are not printing any of the integer fields. After some digging I found that PdfManagerHelper::parseBeanFields will not return any integer fields.


That method checks for enum, currency and other field types and leaves as the default (after all those specific field types) a final condition of 


elseif (is_string($value)) 


is_string will return false when an unquoted number is passed.


Now I'm not sure why but in 7.8.2 the same exact function returns true. I assume it has to do with the way the parameter  $module_instance is structured.


I have fixed the issue with a non-upgrade-safe modification to the parseBeanFields method, adding a final condition to all the if statements:



   $fields_module[$name] = $value;


And I have reported this on a Case to SugarSupport.

I was just wondering if someone else saw this issue or if it is something particular about the custom module I am pulling the data from.