- Patch #16303 by Gerhard: fixed some warnings.

4.7.x
Dries Buytaert 2005-05-21 11:33:03 +00:00
parent 62427644eb
commit cdec2f7e3e
5 changed files with 13 additions and 9 deletions

View File

@ -678,7 +678,7 @@ function arg($index) {
$arguments = explode('/', $_GET['q']);
}
if ($arguments[$index] !== NULL) {
if (isset($arguments[$index])) {
return $arguments[$index];
}
}

View File

@ -288,9 +288,9 @@ function system_get_files_database(&$files, $type) {
// Extract current files from database.
$result = db_query("SELECT name, type, status, throttle FROM {system} WHERE type = '%s'", $type);
while ($file = db_fetch_object($result)) {
if (is_object($files[$file->name])) {
if (isset($files[$file->name]) && is_object($files[$file->name])) {
foreach ($file as $key => $value) {
if (!$files[$file->name]->$key) {
if (!isset($files[$file->name]) || !isset($files[$file->name]->$key)) {
$files[$file->name]->$key = $value;
}
}

View File

@ -288,9 +288,9 @@ function system_get_files_database(&$files, $type) {
// Extract current files from database.
$result = db_query("SELECT name, type, status, throttle FROM {system} WHERE type = '%s'", $type);
while ($file = db_fetch_object($result)) {
if (is_object($files[$file->name])) {
if (isset($files[$file->name]) && is_object($files[$file->name])) {
foreach ($file as $key => $value) {
if (!$files[$file->name]->$key) {
if (!isset($files[$file->name]) || !isset($files[$file->name]->$key)) {
$files[$file->name]->$key = $value;
}
}

View File

@ -332,8 +332,10 @@ function user_access($string, $account = NULL) {
$perm[$account->uid] .= "$row->perm, ";
}
}
return strstr($perm[$account->uid], "$string, ");
if (isset($perm[$account->uid])) {
return strstr($perm[$account->uid], "$string, ");
}
return FALSE;
}
/**

View File

@ -332,8 +332,10 @@ function user_access($string, $account = NULL) {
$perm[$account->uid] .= "$row->perm, ";
}
}
return strstr($perm[$account->uid], "$string, ");
if (isset($perm[$account->uid])) {
return strstr($perm[$account->uid], "$string, ");
}
return FALSE;
}
/**