JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
optimize and test db_reposition_respace()
[wfpl.git] / template.php
index 32c3783..485cc87 100644 (file)
@@ -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();
        }
 }
@@ -632,5 +637,3 @@ function tem_load_new($filename) {
 function tem_sub($name) {
        tem_show($name);
 }
-
-?>