Share ideas, ask questions, and get feedback about developing for ProcessMaker
Forum rules: Please post new questions under "Developing processes & programming" for ProcessMaker 2 or 3.
By angryonion
#779943
Hi, new to processmaker here. I am running an external script to fetch data. When I unserialize the APP_DATA column, it does not work for all cases.
It sometimes throws an error. But when I view the case in processmaker the data is displayed.

The workaround below does not help:
$appData = preg_replace('!s:(\d+):"(.*?)";!e', "'s:'.strlen('$2').':\"$2\";'", $aFields['APP_DATA']);

Any ideas?

thanks!
User avatar
By ashkufaraz
#780346
use this
function unserialize_APP_DATA($APP_DATA)
{
$aVars = unserialize($APP_DATA);
if(!$aVars)
{
$sVars = preg_replace('!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'", $sVars);
$sVars = unserialize( $sVars);
}
return $aVars;

}

Use the latest verified Temu coupon $100 off ([acq[…]

To get $100 off, sign up as a new user using refer[…]

To get $100 off, sign up as a new user using refer[…]

To get $100 off, sign up as a new user using refer[…]