X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=template.php;h=485cc87e167743046715f4f14794412a871c5308;hb=19e2f5c79c22fd1585ca6569ad25e7ecf06ff7f0;hp=c1df1c1c1206c9b5870ea83a8af27bbf23077bc6;hpb=719ab8078dd9f802ef8d4ba965d605319248e592;p=wfpl.git diff --git a/template.php b/template.php index c1df1c1..485cc87 100644 --- a/template.php +++ b/template.php @@ -424,7 +424,8 @@ function &tem_is_old_sub($name, &$template) { if($tem) return $tem; } } - return false; + $false = false; + return $false; } class tem { @@ -462,7 +463,11 @@ class tem { } function get($key) { - return $this->data[$key]; + if (isset($this->data[$key])) { + return $this->data[$key]; + } else { + return; + } } function show($name) { @@ -546,7 +551,7 @@ class tem { } function tem_init() { - if(!$GLOBALS['wfpl_template']) { + if(!isset($GLOBALS['wfpl_template']) || !$GLOBALS['wfpl_template']) { $GLOBALS['wfpl_template'] = new tem(); } }