fixed a few warning messages

This commit is contained in:
mohrt
2001-03-02 18:07:51 +00:00
parent 08d9cb8971
commit 31a10c5d9a
2 changed files with 22 additions and 14 deletions

View File

@@ -118,9 +118,12 @@ class Smarty
\*======================================================================*/ \*======================================================================*/
function Smarty() function Smarty()
{ {
foreach ($this->global_assign as $var_name) foreach ($this->global_assign as $var_name) {
if(isset($GLOBALS[$var_name])) {
$this->assign($var_name, $GLOBALS[$var_name]); $this->assign($var_name, $GLOBALS[$var_name]);
} }
}
}
/*======================================================================*\ /*======================================================================*\
@@ -376,10 +379,11 @@ class Smarty
} }
if ($display) { if ($display) {
echo $results; if(isset($results)) { echo $results; }
return; return;
} else } else {
return $results; if(isset($results)) { return $results; }
}
} }
/*======================================================================*\ /*======================================================================*\

View File

@@ -118,9 +118,12 @@ class Smarty
\*======================================================================*/ \*======================================================================*/
function Smarty() function Smarty()
{ {
foreach ($this->global_assign as $var_name) foreach ($this->global_assign as $var_name) {
if(isset($GLOBALS[$var_name])) {
$this->assign($var_name, $GLOBALS[$var_name]); $this->assign($var_name, $GLOBALS[$var_name]);
} }
}
}
/*======================================================================*\ /*======================================================================*\
@@ -376,10 +379,11 @@ class Smarty
} }
if ($display) { if ($display) {
echo $results; if(isset($results)) { echo $results; }
return; return;
} else } else {
return $results; if(isset($results)) { return $results; }
}
} }
/*======================================================================*\ /*======================================================================*\