Added new function getData to helper hlp_message_helper.php

This commit is contained in:
Paolo
2019-02-08 17:19:56 +01:00
parent 085d612d94
commit 9729036e26
@@ -82,6 +82,21 @@ function hasData($result)
return false;
}
/**
* Returns the property retval if $result contains data
*/
function getData($result)
{
$data = null;
if (hasData($result))
{
$data = $result->retval;
}
return $data;
}
/**
* Checks if the result represents an error
* Wrapper function of isSuccess, more readable code