if (empty($requirement['#type'])) {
      $severity = $severities[isset($requirement['severity']) ? (int) $requirement['severity'] : 0];

The 0 here is used as key in the severities array, which is just a lookup of UI strings:

  $severities = array(
    REQUIREMENT_INFO => array(
      'title' => t('Info'),
      'class' => 'info',
    REQUIREMENT_OK => array(
      'title' => t('OK'),
      'class' => 'ok',
// ...

Looking at the 0, you can't tell which item that picks out of the array. One of the REQUIREMENT_foo constants should be used here.

#2 system.admin_.inc-2120461-1.patch729 bytesamitsedaiz
PASSED: [[SimpleTest]]: [MySQL] 40,447 pass(es). View


joachim’s picture

Priority: Normal » Minor
Issue tags: +Novice

Tagging and setting to minor.

amitsedaiz’s picture

Status: Active » Needs review
729 bytes
PASSED: [[SimpleTest]]: [MySQL] 40,447 pass(es). View

Please find the patch attached. Thanks.

dawehner’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community


rakeshfalke’s picture

Status: Reviewed & tested by the community » Closed (fixed)

define('REQUIREMENT_OK', 0); is define in install.inc.So in place of 0 (zero) we can use REQUIREMENT_OK as it's easy to manage constants.
Issue Resolved. So closing this issue.

joachim’s picture

Status: Closed (fixed) » Reviewed & tested by the community

This isn't fixed. There is a patch which has been reviewed and which is waiting to be committed.

Please check the meaning of issue statuses here: https://drupal.org/node/156119

David_Rothstein’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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