Empty foreach() error when switching a group from standard to course

Bug #1760742 reported by Robert Lyon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Unassigned
17.04
Fix Released
Medium
Unassigned
17.10
Fix Released
Medium
Unassigned
18.04
Fix Released
Medium
Unassigned
18.10
Fix Released
Medium
Unassigned

Bug Description

We get the following error
AR] f6 (lib/group.php:714) Invalid argument supplied for foreach()
Call stack (most recent first):

    log_message("Invalid argument supplied for foreach()", 8, true, true, "/home/robertl/code/mahara-devel/mahara/htdocs/lib/...", 714) at /home/robertl/code/mahara-devel/mahara/htdocs/lib/errors.php:521
    error(2, "Invalid argument supplied for foreach()", "/home/robertl/code/mahara-devel/mahara/htdocs/lib/...", 714, array(size 9)) at /home/robertl/code/mahara-devel/mahara/htdocs/lib/group.php:714
    group_update(object(stdClass)) at /home/robertl/code/mahara-devel/mahara/htdocs/group/edit.php:557
    editgroup_submit(object(Pieform), array(size 31)) at /home/robertl/code/mahara-devel/mahara/htdocs/lib/pieforms/pieform.php:542
    Pieform->__construct(array(size 4)) at /home/robertl/code/mahara-devel/mahara/htdocs/lib/pieforms/pieform.php:164
    Pieform::process(array(size 4)) at /home/robertl/code/mahara-devel/mahara/htdocs/lib/mahara.php:5077
    pieform(array(size 4)) at /home/robertl/code/mahara-devel/mahara/htdocs/group/edit.php:429

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/8765

Revision history for this message
Robert Lyon (robertl-9) wrote :

To Test:

1) Create a group with Role being 'standard'
2) Edit the group and switch Role to 'course'
3) save and see error

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/8765
Committed: https://git.mahara.org/mahara/mahara/commit/087cb93d80038d9b2a9452197f0c2264d8668610
Submitter: Cecilia Vela Gurovic (<email address hidden>)
Branch: master

commit 087cb93d80038d9b2a9452197f0c2264d8668610
Author: Robert Lyon <email address hidden>
Date: Tue Apr 3 13:18:45 2018 +1200

Bug 1760742: Error when changing a group from standard to course

When there are no blogposts made

behatnotneeded

Change-Id: I7a3b2bed818c66fd4edef188ed7ba475e54c3a4c
Signed-off-by: Robert Lyon <email address hidden>

Changed in mahara:
status: In Progress → Fix Committed
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "18.04_STABLE" branch: https://reviews.mahara.org/8778

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "17.10_STABLE" branch: https://reviews.mahara.org/8779

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "17.04_STABLE" branch: https://reviews.mahara.org/8780

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/8780
Committed: https://git.mahara.org/mahara/mahara/commit/a955041245c7f71981f266c2d8365ed1168772f2
Submitter: Robert Lyon (<email address hidden>)
Branch: 17.04_STABLE

commit a955041245c7f71981f266c2d8365ed1168772f2
Author: Robert Lyon <email address hidden>
Date: Tue Apr 3 13:18:45 2018 +1200

Bug 1760742: Error when changing a group from standard to course

When there are no blogposts made

behatnotneeded

Change-Id: I7a3b2bed818c66fd4edef188ed7ba475e54c3a4c
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 087cb93d80038d9b2a9452197f0c2264d8668610)

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/8779
Committed: https://git.mahara.org/mahara/mahara/commit/e35370ee16442f0fddcac409874b47adcadc38f4
Submitter: Robert Lyon (<email address hidden>)
Branch: 17.10_STABLE

commit e35370ee16442f0fddcac409874b47adcadc38f4
Author: Robert Lyon <email address hidden>
Date: Tue Apr 3 13:18:45 2018 +1200

Bug 1760742: Error when changing a group from standard to course

When there are no blogposts made

behatnotneeded

Change-Id: I7a3b2bed818c66fd4edef188ed7ba475e54c3a4c
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 087cb93d80038d9b2a9452197f0c2264d8668610)

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/8778
Committed: https://git.mahara.org/mahara/mahara/commit/8c81c1364b380df7a13932562d86ff1a155559d2
Submitter: Robert Lyon (<email address hidden>)
Branch: 18.04_STABLE

commit 8c81c1364b380df7a13932562d86ff1a155559d2
Author: Robert Lyon <email address hidden>
Date: Tue Apr 3 13:18:45 2018 +1200

Bug 1760742: Error when changing a group from standard to course

When there are no blogposts made

behatnotneeded

Change-Id: I7a3b2bed818c66fd4edef188ed7ba475e54c3a4c
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 087cb93d80038d9b2a9452197f0c2264d8668610)

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.