diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-01-09 20:06:00 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-01-09 20:06:00 +0000 |
commit | 640128b08d8f982c3a5698f9dc9c78523da64d1b (patch) | |
tree | f04eebf71afdac97c89d0abf5a56df45becbe2aa | |
parent | a4b13976775152a44f720f96319c167926397f01 (diff) | |
download | brdo-640128b08d8f982c3a5698f9dc9c78523da64d1b.tar.gz brdo-640128b08d8f982c3a5698f9dc9c78523da64d1b.tar.bz2 |
- Added some isset()s to kill some "Undefined variable" warnings. Patch by
Julio.
-rw-r--r-- | includes/common.inc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/includes/common.inc b/includes/common.inc index b787945ea..84da63d0e 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -115,7 +115,7 @@ function request_uri() { global $REQUEST_URI, $PATH_INFO, $QUERY_STRING; - if ($REQUEST_URI) { + if (isset($REQUEST_URI)) { return $REQUEST_URI; } else { @@ -211,7 +211,7 @@ function table_cell($cell, $header = 0) { $data = $cell; } - if ($header) { + if (isset($header)) { $output = "<th$attributes>$data</th>"; } else { @@ -341,7 +341,7 @@ function search_data() { $keys = check_input($keys); - if ($keys) { + if (isset($keys)) { foreach (module_list() as $name) { if (module_hook($name, "search") && (!$edit["type"] || $edit["type"][$name]) && ($result = module_invoke($name, "search", check_query($keys)))) { if ($name == "node" || $name == "comment") { @@ -376,7 +376,7 @@ function search_data() { function search_type($type = 0, $action = 0, $query = 0, $options = 0) { global $edit; - if ($type) { + if (isset($type)) { $edit["type"][$type] = "on"; } @@ -472,7 +472,7 @@ function filter($text) { } function check_output($text) { - if ($text) { + if (isset($text)) { $text = stripslashes($text); if (strip_tags($text, "<a><i><b><u><tt><code><cite><strong><img>") == $text) { @@ -721,8 +721,8 @@ function form_weight($title = NULL, $name = "weight", $value = 0, $delta = 10, $ function url($url, $query = NULL) { - if ($url) { - if ($query) { + if (isset($url)) { + if (isset($query)) { return "?q=$url&$query"; } else { @@ -730,7 +730,7 @@ function url($url, $query = NULL) { } } else { - if ($query) { + if (isset($query)) { return "?$query"; } } @@ -753,7 +753,7 @@ function field_get($string, $name) { function field_set($string, $name, $value) { $rval = ereg_replace(",$name=[^,]+", "", ",$string"); - if ($value) { + if (isset($value)) { $rval .= ($rval == "," ? "" : ",") ."$name=$value"; } return substr($rval, 1); |