JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
fix loads of unset variable/index notices
[wfpl.git] / main.php
index f5be944..3d4a751 100644 (file)
--- a/main.php
+++ b/main.php
@@ -121,12 +121,12 @@ function wfpl_main($dest = false) {
        }
 
        # Check for $GLOBALS['wfpl_template'] because it might have been set (or unset) by the php script.
-       if($GLOBALS['wfpl_template'] || $GLOBALS['wfpl_main_template']) {
-               if($GLOBALS['wfpl_main_template']) {
+       if(isset($GLOBALS['wfpl_template']) || isset($GLOBALS['wfpl_main_template'])) {
+               if(isset($GLOBALS['wfpl_main_template'])) {
                        # if there was a template for that page, and one for the whole
                        # site, copy all template sections that have been show()n to the
                        # site-wide template
-                       if($GLOBALS['wfpl_template']) {
+                       if(isset($GLOBALS['wfpl_template'])) {
                                $GLOBALS['wfpl_main_template']->merge($GLOBALS['wfpl_template']);
                        }