summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/file.inc2
-rw-r--r--modules/field/field.crud.inc4
-rw-r--r--modules/system/system.admin.inc2
3 files changed, 4 insertions, 4 deletions
diff --git a/includes/file.inc b/includes/file.inc
index a6f7097ec..2d7b4dc6f 100644
--- a/includes/file.inc
+++ b/includes/file.inc
@@ -1296,7 +1296,7 @@ function file_space_used($uid = NULL, $status = FILE_STATUS_PERMANENT) {
$query = db_select('file_managed', 'f');
$query->condition('f.status', $status);
$query->addExpression('SUM(f.filesize)', 'filesize');
- if (!is_null($uid)) {
+ if (isset($uid)) {
$query->condition('f.uid', $uid);
}
return $query->execute()->fetchField();
diff --git a/modules/field/field.crud.inc b/modules/field/field.crud.inc
index b9f38814d..dc5a08dfe 100644
--- a/modules/field/field.crud.inc
+++ b/modules/field/field.crud.inc
@@ -762,7 +762,7 @@ function _field_write_instance($instance, $update = FALSE) {
// If no weight specified, make sure the field sinks at the bottom.
if (!isset($instance['widget']['weight'])) {
$max_weight = field_info_max_weight($instance['entity_type'], $instance['bundle'], 'form');
- $instance['widget']['weight'] = !is_null($max_weight) ? $max_weight + 1 : 0;
+ $instance['widget']['weight'] = isset($max_weight) ? $max_weight + 1 : 0;
}
// Check widget module.
$widget_type = field_info_widget_types($instance['widget']['type']);
@@ -788,7 +788,7 @@ function _field_write_instance($instance, $update = FALSE) {
// If no weight specified, make sure the field sinks at the bottom.
if (!isset($display['weight'])) {
$max_weight = field_info_max_weight($instance['entity_type'], $instance['bundle'], $view_mode);
- $display['weight'] = !is_null($max_weight) ? $max_weight + 1 : 0;
+ $display['weight'] = isset($max_weight) ? $max_weight + 1 : 0;
}
$instance['display'][$view_mode] = $display;
}
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc
index 13652b2c6..ff70cc279 100644
--- a/modules/system/system.admin.inc
+++ b/modules/system/system.admin.inc
@@ -639,7 +639,7 @@ function system_theme_settings($form, &$form_state, $key = '') {
}
// Restore the original current theme.
- if (!is_null($default_theme)) {
+ if (isset($default_theme)) {
$GLOBALS['theme_key'] = $default_theme;
}
else {