diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/field/field.crud.inc | 4 | ||||
-rw-r--r-- | modules/system/system.admin.inc | 2 |
2 files changed, 3 insertions, 3 deletions
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 { |