See #1325524: Cache libraries_detect()

Will post a patch in a minute.

Comments

tstoeckler’s picture

Ooohhhh...
Was about to roll this patch, when I realized that changing libraries_info() to the early-return style, we would have to duplicate the following, if I'm not mistaken:

  if (isset($name)) {
    if (!empty($libraries[$name])) {
      return $libraries[$name];
    }
    else {
      $false = FALSE;
      return $false;
    }
  }
  return $libraries;

I'll have to look at this tomorrow again, but it seems to me that this will be the quickest self-won't-fix in Drupal-history...

tstoeckler’s picture

Status: Active » Closed (won't fix)

Yeah, let's not do that...
Sorry!