return value of hook will be passed on even if not a string

This commit is contained in:
Uwe Steinmann 2015-04-27 08:26:51 +02:00
parent 2781974f7b
commit c7ad9433a1

View File

@ -81,17 +81,23 @@ class SeedDMS_View_Common {
$tmpret = $hookObj->$hook($this); $tmpret = $hookObj->$hook($this);
if(is_string($tmpret)) if(is_string($tmpret))
$ret .= $tmpret; $ret .= $tmpret;
else
$ret = $tmpret;
break; break;
case 2: case 2:
$tmpret = $hookObj->$hook($this, func_get_arg(1)); $tmpret = $hookObj->$hook($this, func_get_arg(1));
if(is_string($tmpret)) if(is_string($tmpret))
$ret .= $tmpret; $ret .= $tmpret;
else
$ret = $tmpret;
break; break;
case 3: case 3:
default: default:
$tmpret = $hookObj->$hook($this, func_get_arg(1), func_get_arg(2)); $tmpret = $hookObj->$hook($this, func_get_arg(1), func_get_arg(2));
if(is_string($tmpret)) if(is_string($tmpret))
$ret .= $tmpret; $ret .= $tmpret;
else
$ret = $tmpret;
} }
} }
} }