diff --git a/core/lib/Drupal/Core/Entity/DatabaseStorageControllerNG.php b/core/lib/Drupal/Core/Entity/DatabaseStorageControllerNG.php index faa7410..dfb5f0d 100644 --- a/core/lib/Drupal/Core/Entity/DatabaseStorageControllerNG.php +++ b/core/lib/Drupal/Core/Entity/DatabaseStorageControllerNG.php @@ -290,7 +290,7 @@ protected function invokeHook($hook, EntityInterface $entity) { protected function mapToStorageRecord(EntityInterface $entity) { $record = new \stdClass(); foreach ($this->entityInfo['schema_fields_sql']['base_table'] as $name) { - if (isset($entity->$name->value)) { + if (isset($entity->$name->value)) { $record->$name = $entity->$name->value; } } diff --git a/core/modules/aggregator/aggregator.admin.inc b/core/modules/aggregator/aggregator.admin.inc index 3612e0c..b31b580 100644 --- a/core/modules/aggregator/aggregator.admin.inc +++ b/core/modules/aggregator/aggregator.admin.inc @@ -590,7 +590,7 @@ function aggregator_admin_form_submit($form, &$form_state) { * Form constructor to add/edit/delete aggregator categories. * * @param $edit - * An associative array containing: + * An object containing: * - title: A string to use for the category title. * - description: A string to use for the category description. * - cid: The category ID. @@ -600,22 +600,22 @@ function aggregator_admin_form_submit($form, &$form_state) { * @see aggregator_form_category_validate() * @see aggregator_form_category_submit() */ -function aggregator_form_category($form, &$form_state, $edit = array('title' => '', 'description' => '', 'cid' => NULL)) { +function aggregator_form_category($form, &$form_state, $edit = NULL) { $form['title'] = array('#type' => 'textfield', '#title' => t('Title'), - '#default_value' => $edit['title'], + '#default_value' => isset($edit->title) ? $edit->title : '', '#maxlength' => 64, '#required' => TRUE, ); $form['description'] = array('#type' => 'textarea', '#title' => t('Description'), - '#default_value' => $edit['description'], + '#default_value' => isset($edit->description) ? $edit->description : '', ); $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save')); - if ($edit['cid']) { + if (!empty($edit->cid)) { $form['actions']['delete'] = array('#type' => 'submit', '#value' => t('Delete')); - $form['cid'] = array('#type' => 'hidden', '#value' => $edit['cid']); + $form['cid'] = array('#type' => 'hidden', '#value' => $edit->cid); } return $form; diff --git a/core/modules/aggregator/aggregator.pages.inc b/core/modules/aggregator/aggregator.pages.inc index fcbf695..ec638e4 100644 --- a/core/modules/aggregator/aggregator.pages.inc +++ b/core/modules/aggregator/aggregator.pages.inc @@ -215,12 +215,12 @@ function aggregator_categorize_items($items, $feed_source = '') { $form['feed_source'] = array( '#value' => $feed_source, ); - if ($items) { - $form['items'] = entity_view_multiple($items, 'default'); - } $categories = array(); $done = FALSE; $form['items'] = array(); + if ($items) { + $form['items'] = entity_view_multiple($items, 'default'); + } $form['categories'] = array( '#tree' => TRUE, ); @@ -342,7 +342,7 @@ function template_preprocess_aggregator_item(&$variables) { $variables['source_url'] = url("aggregator/sources/$item->fid->value"); $variables['source_title'] = check_plain($item->ftitle); } -if (date('Ymd', $item->timestamp->value) == date('Ymd')) { + if (date('Ymd', $item->timestamp->value) == date('Ymd')) { $variables['source_date'] = t('%ago ago', array('%ago' => format_interval(REQUEST_TIME - $item->timestamp->value))); } else {