When editing view access for collections and there are no views then an error is thrown

Bug #784405 reported by Hugh Davenport
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Hugh Davenport

Bug Description

On /view/access.php

When there are collections, but no views, then the following error is thrown

[Wed May 18 17:42:43 2011] [error] [client ::1] [WAR] 6e (view/access.php:497) Undefined index: views, referer: http://localhost/mahara/view/access.php?id=16
[Wed May 18 17:42:43 2011] [error] [client ::1] Call stack (most recent first):, referer: http://localhost/mahara/view/access.php?id=16
[Wed May 18 17:42:43 2011] [error] [client ::1] * log_message("Undefined index: views", 8, true, true, "/home/hugh/src/mahara/mahara/htdocs/view/access.ph...", 497) at /home/hugh/src/mahara/mahara/htdocs/lib/errors.php:446, referer: http://localhost/mahara/view/access.php?id=16
[Wed May 18 17:42:43 2011] [error] [client ::1] * error(8, "Undefined index: views", "/home/hugh/src/mahara/mahara/htdocs/view/access.ph...", 497, array(size 12)) at /home/hugh/src/mahara/mahara/htdocs/view/access.php:497, referer: http://localhost/mahara/view/access.php?id=16
[Wed May 18 17:42:43 2011] [error] [client ::1] * editaccess_submit(object(Pieform), array(size 11)) at Unknown:0, referer: http://localhost/mahara/view/access.php?id=16
[Wed May 18 17:42:43 2011] [error] [client ::1] * call_user_func_array("editaccess_submit", array(size 2)) at /home/hugh/src/mahara/mahara/htdocs/lib/pieforms/pieform.php:512, referer: http://localhost/mahara/view/access.php?id=16
[Wed May 18 17:42:43 2011] [error] [client ::1] * Pieform->__construct(array(size 7)) at /home/hugh/src/mahara/mahara/htdocs/lib/pieforms/pieform.php:161, referer: http://localhost/mahara/view/access.php?id=16
[Wed May 18 17:42:43 2011] [error] [client ::1] * Pieform::process(array(size 7)) at /home/hugh/src/mahara/mahara/htdocs/lib/pieforms/pieform.php:71, referer: http://localhost/mahara/view/access.php?id=16
[Wed May 18 17:42:43 2011] [error] [client ::1] * pieform(array(size 7)) at /home/hugh/src/mahara/mahara/htdocs/view/access.php:515, referer: http://localhost/mahara/view/access.php?id=16
[Wed May 18 17:42:43 2011] [error] [client ::1] , referer: http://localhost/mahara/view/access.php?id=16
[Wed May 18 17:42:43 2011] [error] [client ::1] [WAR] 6e (view/access.php:497) Invalid argument supplied for foreach(), referer: http://localhost/mahara/view/access.php?id=16
[Wed May 18 17:42:43 2011] [error] [client ::1] Call stack (most recent first):, referer: http://localhost/mahara/view/access.php?id=16
[Wed May 18 17:42:43 2011] [error] [client ::1] * log_message("Invalid argument supplied for foreach()", 8, true, true, "/home/hugh/src/mahara/mahara/htdocs/view/access.ph...", 497) at /home/hugh/src/mahara/mahara/htdocs/lib/errors.php:446, referer: http://localhost/mahara/view/access.php?id=16
[Wed May 18 17:42:43 2011] [error] [client ::1] * error(2, "Invalid argument supplied for foreach()", "/home/hugh/src/mahara/mahara/htdocs/view/access.ph...", 497, array(size 12)) at /home/hugh/src/mahara/mahara/htdocs/view/access.php:497, referer: http://localhost/mahara/view/access.php?id=16
[Wed May 18 17:42:43 2011] [error] [client ::1] * editaccess_submit(object(Pieform), array(size 11)) at Unknown:0, referer: http://localhost/mahara/view/access.php?id=16
[Wed May 18 17:42:43 2011] [error] [client ::1] * call_user_func_array("editaccess_submit", array(size 2)) at /home/hugh/src/mahara/mahara/htdocs/lib/pieforms/pieform.php:512, referer: http://localhost/mahara/view/access.php?id=16
[Wed May 18 17:42:43 2011] [error] [client ::1] * Pieform->__construct(array(size 7)) at /home/hugh/src/mahara/mahara/htdocs/lib/pieforms/pieform.php:161, referer: http://localhost/mahara/view/access.php?id=16
[Wed May 18 17:42:43 2011] [error] [client ::1] * Pieform::process(array(size 7)) at /home/hugh/src/mahara/mahara/htdocs/lib/pieforms/pieform.php:71, referer: http://localhost/mahara/view/access.php?id=16
[Wed May 18 17:42:43 2011] [error] [client ::1] * pieform(array(size 7)) at /home/hugh/src/mahara/mahara/htdocs/view/access.php:515, referer: http://localhost/mahara/view/access.php?id=16
[Wed May 18 17:42:43 2011] [error] [client ::1] , referer: http://localhost/mahara/view/access.php?id=16

Revision history for this message
Hugh Davenport (hugh-davenport) wrote :
Changed in mahara:
assignee: nobody → Hugh Davenport (hugh-catalyst)
status: New → In Progress
Changed in mahara:
importance: Undecided → Medium
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/199
Committed: http://gitorious.org/mahara/mahara/commit/8eabd9e641607b446279a9733f8fd2407afbd2d1
Submitter: Francois Marier (<email address hidden>)
Branch: master

commit 8eabd9e641607b446279a9733f8fd2407afbd2d1
Author: Hugh Davenport <email address hidden>
Date: Wed May 18 17:44:49 2011 +1200

    Fix bug when updating access with no views

    Bug #784405

    Change-Id: Ic052ab8591632637c8dd51430d7ac301f79b4e14
    Signed-off-by: Hugh Davenport <email address hidden>

Changed in mahara:
status: In Progress → Fix Committed
Revision history for this message
François Marier (fmarier) wrote :

When there's no milestone associated with a fix for master, let's just set it to 1.5.0. That way we can start keeping track of the changes that are getting into 1.5.

Changed in mahara:
milestone: none → 1.5.0
Melissa Draper (melissa)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.