function is_sub_template(&$piece) {
- return is_array($piece) and $piece['pieces'];
+ return is_array($piece) && isset($piece['pieces']);
}
function is_value_slot(&$piece) {
- return is_array($piece) and !$piece['pieces'];
+ return is_array($piece) && !isset($piece['pieces']);
}
# Return a hash containing the top-level sub-templates of tem.
}
function append($key, $value) {
+ if (!isset($this->data[$key])) {
+ $this->data[$key] = '';
+ }
$this->data[$key] .= $value;
}
function show($name) {
$tem = tem_is_old_sub($name, $this->template);
if($tem) {
+ if (!isset($this->data[$name])) {
+ $this->data[$name] = '';
+ }
$this->data[$name] .= fill_template($tem, $this->data);
}
}