Unverified Commit 6b54e953 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2778917 by kiamlaluno, jungle, elaman, dawehner, alexpott, tvb,...

Issue #2778917 by kiamlaluno, jungle, elaman, dawehner, alexpott, tvb, vadim.hirbu, ravi.shankar, quietone: Use the second parameter of \Drupal::state()->get() instead of checking the method didn't return any value
parent ed11f4f8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1565,7 +1565,7 @@ function install_profile_modules(&$install_state) {
  // as those will not be handled by the module installer.
  install_core_entity_type_definitions();

  $modules = \Drupal::state()->get('install_profile_modules') ?: [];
  $modules = \Drupal::state()->get('install_profile_modules', []);
  $files = \Drupal::service('extension.list.module')->getList();
  \Drupal::state()->delete('install_profile_modules');

+1 −1
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@ public function optimize(array $css_assets) {
    // Drupal contrib can override this default CSS aggregator to keep the same
    // grouping, optimizing and dumping, but change the strategy that is used to
    // determine when the aggregate should be rebuilt (e.g. mtime, HTTPS …).
    $map = $this->state->get('drupal_css_cache_files') ?: [];
    $map = $this->state->get('drupal_css_cache_files', []);
    $css_assets = [];
    foreach ($css_groups as $order => $css_group) {
      // We have to return a single asset, not a group of assets. It is now up
+1 −1
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@ public function optimize(array $js_assets) {
    // Drupal contrib can override this default JS aggregator to keep the same
    // grouping, optimizing and dumping, but change the strategy that is used to
    // determine when the aggregate should be rebuilt (e.g. mtime, HTTPS …).
    $map = $this->state->get('system.js_cache_files') ?: [];
    $map = $this->state->get('system.js_cache_files', []);
    $js_assets = [];
    foreach ($js_groups as $order => $js_group) {
      // We have to return a single asset, not a group of assets. It is now up
+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ class TestMailCollector extends PhpMail implements MailInterface {
   * {@inheritdoc}
   */
  public function mail(array $message) {
    $captured_emails = \Drupal::state()->get('system.test_mail_collector') ?: [];
    $captured_emails = \Drupal::state()->get('system.test_mail_collector', []);
    $captured_emails[] = $message;
    \Drupal::state()->set('system.test_mail_collector', $captured_emails);

+1 −1
Original line number Diff line number Diff line
@@ -111,7 +111,7 @@ function ckeditor_library_info_alter(&$libraries, $extension) {
  // Pass Drupal's JS cache-busting string via settings along to CKEditor.
  // @see http://docs.ckeditor.com/#!/api/CKEDITOR-property-timestamp
  if ($extension === 'ckeditor' && isset($libraries['drupal.ckeditor'])) {
    $query_string = \Drupal::state()->get('system.css_js_query_string') ?: '0';
    $query_string = \Drupal::state()->get('system.css_js_query_string', '0');
    $libraries['drupal.ckeditor']['drupalSettings']['ckeditor']['timestamp'] = $query_string;
  }
}
Loading