- Patch #16303 by Gerhard: fixed some warnings.
parent
62427644eb
commit
cdec2f7e3e
|
@ -678,7 +678,7 @@ function arg($index) {
|
|||
$arguments = explode('/', $_GET['q']);
|
||||
}
|
||||
|
||||
if ($arguments[$index] !== NULL) {
|
||||
if (isset($arguments[$index])) {
|
||||
return $arguments[$index];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue