Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
wfpl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
003188a
)
use isset() more to clean up notices
author
Jason Woofenden
<jason@jasonwoof.com>
Tue, 26 May 2015 17:23:23 +0000
(13:23 -0400)
committer
Jason Woofenden
<jason@jasonwoof.com>
Tue, 26 May 2015 17:23:23 +0000
(13:23 -0400)
template.php
patch
|
blob
|
history
diff --git
a/template.php
b/template.php
index
7539a19
..
fa0affb
100644
(file)
--- a/
template.php
+++ b/
template.php
@@
-248,11
+248,11
@@
function tem_encoded_data($tag, $context)
function is_sub_template(&$piece) {
function is_sub_template(&$piece) {
- return is_array($piece) and $piece['pieces'];
+ return is_array($piece) && isset($piece['pieces']);
}
function is_value_slot(&$piece) {
}
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.
}
# Return a hash containing the top-level sub-templates of tem.
@@
-457,6
+457,9
@@
class tem {
}
function append($key, $value) {
}
function append($key, $value) {
+ if (!isset($this->data[$key])) {
+ $this->data[$key] = '';
+ }
$this->data[$key] .= $value;
}
$this->data[$key] .= $value;
}
@@
-475,6
+478,9
@@
class tem {
function show($name) {
$tem = tem_is_old_sub($name, $this->template);
if($tem) {
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);
}
}
$this->data[$name] .= fill_template($tem, $this->data);
}
}