summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/file.inc4
-rw-r--r--includes/menu.inc2
-rw-r--r--includes/module.inc3
-rw-r--r--includes/theme.inc1
4 files changed, 7 insertions, 3 deletions
diff --git a/includes/file.inc b/includes/file.inc
index 702641312..e7c97a316 100644
--- a/includes/file.inc
+++ b/includes/file.inc
@@ -193,7 +193,7 @@ function file_check_upload($source = 'upload') {
}
// If a file was uploaded, process it.
- if ($_FILES["files"]["name"][$source] && is_uploaded_file($_FILES["files"]["tmp_name"][$source])) {
+ if (isset($_FILES["files"]["name"][$source]) && is_uploaded_file($_FILES["files"]["tmp_name"][$source])) {
// Check for file upload errors and return FALSE if a
// lower level system error occurred.
@@ -253,7 +253,7 @@ function file_check_upload($source = 'upload') {
else {
// In case of previews return previous file object.
- if (file_exists($_SESSION['file_uploads'][$source]->filepath)) {
+ if (isset($_SESSION['file_uploads'][$source]->filepath) && file_exists($_SESSION['file_uploads'][$source]->filepath)) {
return $_SESSION['file_uploads'][$source];
}
}
diff --git a/includes/menu.inc b/includes/menu.inc
index 8a5ac6d8c..97a2eda53 100644
--- a/includes/menu.inc
+++ b/includes/menu.inc
@@ -367,7 +367,7 @@ function _menu_tree($result = NULL, $depth = 0, $link = array('link' => '', 'has
break;
}
}
- if ($link['link']) {
+ if (isset($link['link'])) {
$tree .= theme('menu_link', $link);
}
return array($remnant, $tree);
diff --git a/includes/module.inc b/includes/module.inc
index 44aba1874..36105b4f8 100644
--- a/includes/module.inc
+++ b/includes/module.inc
@@ -110,6 +110,9 @@ function module_rebuild_cache() {
continue;
}
$files[$filename]->info = $file->info;
+ if (!isset($files[$filename]->info['version'])) {
+ $files[$filename]->info['version'] = NULL;
+ }
// log the critical hooks implemented by this module
$bootstrap = 0;
diff --git a/includes/theme.inc b/includes/theme.inc
index a5aab93ea..24db4adb5 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -610,6 +610,7 @@ function theme_links($links, $attributes = array('class' => 'links')) {
function theme_image($path, $alt = '', $title = '', $attributes = NULL, $getsize = TRUE) {
if (!$getsize || (is_file($path) && (list($width, $height, $type, $image_attributes) = @getimagesize($path)))) {
$attributes = drupal_attributes($attributes);
+ $image_attributes = isset($image_attributes) ? $image_attributes : '';
$url = (url($path) == $path) ? $path : (base_path() . $path);
return '<img src="'. check_url($url) .'" alt="'. check_plain($alt) .'" title="'. check_plain($title) .'" '. $image_attributes . $attributes .' />';
}