Uploaded image for project: 'COmanage'
  1. COmanage
  2. CO-908

Adding user role to user does bad compare on null status field

    XMLWordPrintable

Details

    Description

      Setup - Existing, Active person.

      Action - edit the person. Scroll down to 'Role Attributes', click add.

      Result - in Row for Status, under status drop-down, two warning are printed

      <snip>
      Notice (8): Undefined index: status [APP/View/CoPersonRoles/fields.inc, line 187]

      Notice (8): Undefined index: status [APP/View/CoPersonRoles/fields.inc, line 188]
      </snip>

      This the only result - functionality seem unhampered.

      Looking at the code, the code compares $co_person_roles[0]['CoPersonRole']['status'] to the enum values, but since this is a new role, the status is null.

      Just my 2 cents, but it the if statement was changed include '&& isset( $co_person_roles[0]['CoPersonRole']['status'] ) ' before the compare, that may be all that is needed.

      Attachments

        Activity

          People

            benn.oshrin@at.internet2.edu Benn Oshrin (internet2.edu)
            michael.manske@at.internet2.edu Michael Manske (ligo.org)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: