← Back to team overview

mahara-contributors team mailing list archive

[Bug 1311963] [NEW] "Undefined index" warning on account settings page

 

Public bug reported:

In Mahara 1.10dev, when I go to the account settings page for a user who
belongs to an institution, I see this warning at the top of the page:

[WAR] b0 (admin/users/edit.php:661) Undefined index: one
Call stack (most recent first):

    log_message("Undefined index: one", 8, true, true, "/home/aaronw/www/mahara/htdocs/admin/users/edit.ph...", 661) at /home/aaronw/www/mahara/htdocs/lib/errors.php:433
    error(8, "Undefined index: one", "/home/aaronw/www/mahara/htdocs/admin/users/edit.ph...", 661, array(size 73)) at /home/aaronw/www/mahara/htdocs/admin/users/edit.php:661

This is because we added an "id" column to the institution table, and
there is a call to get_records_assoc() that uses the default '*' for the
fields to use. Later code then assumes that the key of the returned
array will be institution.name, when in fact it is now institution.id.

Note that this can only be replicated on a clean install of 1.10. If you
upgrade to 1.10, then the "name" column will still be first.

** Affects: mahara
     Importance: High
         Status: In Progress


** Tags: regression

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1311963

Title:
  "Undefined index" warning on account settings page

Status in Mahara ePortfolio:
  In Progress

Bug description:
  In Mahara 1.10dev, when I go to the account settings page for a user
  who belongs to an institution, I see this warning at the top of the
  page:

  [WAR] b0 (admin/users/edit.php:661) Undefined index: one
  Call stack (most recent first):

      log_message("Undefined index: one", 8, true, true, "/home/aaronw/www/mahara/htdocs/admin/users/edit.ph...", 661) at /home/aaronw/www/mahara/htdocs/lib/errors.php:433
      error(8, "Undefined index: one", "/home/aaronw/www/mahara/htdocs/admin/users/edit.ph...", 661, array(size 73)) at /home/aaronw/www/mahara/htdocs/admin/users/edit.php:661

  This is because we added an "id" column to the institution table, and
  there is a call to get_records_assoc() that uses the default '*' for
  the fields to use. Later code then assumes that the key of the
  returned array will be institution.name, when in fact it is now
  institution.id.

  Note that this can only be replicated on a clean install of 1.10. If
  you upgrade to 1.10, then the "name" column will still be first.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1311963/+subscriptions


Follow ups

References