Fix are included/attached.

CommentFileSizeAuthor
#4 install.inc_.patch980 bytesquiptime
install.inc_.patch798 bytesquiptime
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

aspilicious’s picture

Status: Needs work » Needs review
jpmckinney’s picture

This will set $requirement['title'] to the empty string whether it was already set or not, and I doubt $requirement['title'] will always be unset. How do you reproduce this error?

dawehner’s picture

Status: Needs review » Needs work

This would mean:

             $message .= ' (' . t('Currently using !item !version', array('!item' => $requirement['title'], '!version' => $requirement['value'])) . ')';

Has never $requirement['title'] which is senseless

quiptime’s picture

FileSize
980 bytes

Better solution for missing title.

dawehner’s picture

I would use isset, because the title "0" is a valid title, but its a boolean false.

David_Rothstein’s picture

Priority: Critical » Normal

I don't see how this can possibly be a critical bug, or how it's necessarily even a bug in this function at all? As documented in http://api.drupal.org/api/function/hook_requirements/7, 'title' is always supposed to be returned, so this is occurring due to a bug in someone's implementation of this hook, not the code here.

Now what I also don't understand is the existing behavior of the function :) Why is there a drupal_set_message() in an API function like this at all (seems like that should generally be up to the caller), and why in the world does it try to assume that all error messages returned by hook_requirements() make any sense when printed out in the format "Currently using !item !version..."???

David_Rothstein’s picture

why in the world does it try to assume that all error messages returned by hook_requirements() make any sense when printed out in the format "Currently using !item !version

Hm, looking a little closer, I guess it's pseudo-documented in the hook that at install time, it's only supposed to return things like library version numbers and such... but it's still pretty weird.

I guess that's not for us to change here though. In this issue, let's just figure out where the hook implementation is that doesn't define a 'title', and fix the bug by defining one there.

jpmckinney’s picture

Looks like everything in core defines a title. The issue creator should report which modules they have installed.

jpmckinney’s picture

Issue summary: View changes
Status: Needs work » Closed (cannot reproduce)