mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 09:35:00 +00:00
better handling of return values of hooks
This commit is contained in:
parent
50cf2fa5a0
commit
869a82d4a8
|
@ -121,10 +121,10 @@ class SeedDMS_View_Common {
|
|||
break;
|
||||
}
|
||||
if($tmpret !== null) {
|
||||
if(is_string($tmpret))
|
||||
$ret .= $tmpret;
|
||||
elseif(is_array($tmpret) || is_object($tmpret)) {
|
||||
$ret = ($ret === null) ? $tmpret : array_merge($ret, $tmpret);
|
||||
if(is_string($tmpret)) {
|
||||
$ret = ($ret === null) ? $tmpret : (is_string($ret) ? $ret.$tmpret : array_merge($ret, array($tmpret)));
|
||||
} elseif(is_array($tmpret) || is_object($tmpret)) {
|
||||
$ret = ($ret === null) ? $tmpret : (is_string($ret) ? array_merge(array($ret), $tmpret) : array_merge($ret, $tmpret));
|
||||
} else
|
||||
$ret = $tmpret;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user