If there were no calls to drupal_add_js() with non-empty data, the settings array is not set and the following notices and warning appear on the line #215 of views_plugin_cache.inc (in views_plugin_cache->gather_headers() ):

  • Undefined index: settings
  • Undefined index: settings
  • array_diff_assoc(): Argument #1 is not an array
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dmitriy.trt’s picture

Status: Active » Needs review
FileSize
1.18 KB

Fix for this problem.

dawehner’s picture

This looks pretty fine, not sure whether this might be worth to write a test for that.

Dmitriy.trt’s picture

FileSize
1.95 KB

Found a workaround in cache tests to suppress warnings described above. New patch removes this workaround.

I think the test for this problem is not necessary. The test from which I've removed the workaround will fail anyway because of warnings if the problem appear again in the future. But I could write a separate test if you think we really need it here.

dawehner’s picture

Status: Needs review » Fixed

Nice! This looks fine, lets get it in.

Dmitriy.trt’s picture

Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.