Header Items - Many Repeat Loads of Single Resources

Permalink
We have just had a problem with the functioning of the User Profile Edit page in IE.

After a close examination we noticed that the query.ui.js and the query.ui.css files where being loaded many times at the end of the usual header item loads. Then, after some investigation, we were able to "fix" the problem be editing the core View Class.

By modifying this code in the outputHeaderItems() method:
$prior_hi = array(); // added by gc
         foreach($items as $hi) {
            if(!in_array($hi, $prior_hi)) { // gc
               print $hi; // caled on two seperate lines because of pre php 5.2 __toString issues
               print "\n";
               $prior_hi[] = $hi; // gc
               }
         }

This should have been prevented by the existing code in the addHeaderItem() method:
$items = array_merge($a1, $a2, $a3);
         if (version_compare(PHP_VERSION, '5.2.9', '<')) {
            $items = array_unique($items);
         } else {
            // stupid PHP
            $items = array_unique($items, SORT_STRING);
         }

Somehow the PHP "array_unique()" function has failed.

Any thoughts?

Garry Claridge

garrycl