mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
Added new function getData to helper hlp_message_helper.php
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user