diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/actions.inc | 2 | ||||
-rw-r--r-- | includes/database/pgsql/schema.inc | 4 | ||||
-rw-r--r-- | includes/tablesort.inc | 4 | ||||
-rw-r--r-- | includes/theme.inc | 2 |
4 files changed, 5 insertions, 7 deletions
diff --git a/includes/actions.inc b/includes/actions.inc index 8ee7d5129..fa1f7d386 100644 --- a/includes/actions.inc +++ b/includes/actions.inc @@ -278,7 +278,7 @@ function actions_synchronize($delete_orphans = FALSE) { // user adds the action. if (!$array['configurable']) { // If we already have an action ID for this action, no need to assign aid. - if (array_key_exists($callback, $actions_in_db)) { + if (isset($actions_in_db[$callback])) { unset($actions_in_db[$callback]); } else { diff --git a/includes/database/pgsql/schema.inc b/includes/database/pgsql/schema.inc index 2ad720ed7..1443bc5c0 100644 --- a/includes/database/pgsql/schema.inc +++ b/includes/database/pgsql/schema.inc @@ -469,9 +469,7 @@ class DatabaseSchema_pgsql extends DatabaseSchema { throw new DatabaseSchemaObjectExistsException(t("Cannot rename field %table.%name to %name_new: target field already exists.", array('%table' => $table, '%name' => $field, '%name_new' => $field_new))); } - if (!array_key_exists('size', $spec)) { - $spec['size'] = 'normal'; - } + $spec += array('size' => 'normal'); // Map type definition to the PostgreSQL type. if (!isset($spec['pgsql_type'])) { diff --git a/includes/tablesort.inc b/includes/tablesort.inc index 960bd2f0d..afa5a6979 100644 --- a/includes/tablesort.inc +++ b/includes/tablesort.inc @@ -80,7 +80,7 @@ class TableSort extends SelectQueryExtender { // User has not specified a sort. Use default if specified; otherwise use "asc". else { foreach ($this->header as $header) { - if (is_array($header) && array_key_exists('sort', $header)) { + if (isset($header['sort'])) { return $header['sort']; } } @@ -279,7 +279,7 @@ function tablesort_get_sort($headers) { // User has not specified a sort. Use default if specified; otherwise use "asc". else { foreach ($headers as $header) { - if (is_array($header) && array_key_exists('sort', $header)) { + if (isset($header['sort'])) { return $header['sort']; } } diff --git a/includes/theme.inc b/includes/theme.inc index 6c7a779d9..fb7038393 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -402,7 +402,7 @@ function _theme_process_registry(&$cache, $name, $type, $theme, $path) { // that themes don't need to specify this information, since the module // that registered the theme hook already has. foreach (array('variables', 'render element', 'pattern', 'base hook') as $key) { - if (!array_key_exists($key, $info) && isset($cache[$hook][$key])) { + if (!isset($info[$key]) && isset($cache[$hook][$key])) { $result[$hook][$key] = $cache[$hook][$key]; } } |