Error when deleting a user relating to the group quota

Bug #1765264 reported by Robert Lyon on 2018-04-19
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mahara
Medium
Unassigned
17.10
Medium
Unassigned
18.04
Medium
Unassigned

Bug Description

[WAR] 50 (lib/adodb/adodb-exceptions.inc.php:45) Array to string conversion
Call stack (most recent first):
  * log_message("Array to string conversion", 8, true, true, "/home/robertl/clients/catalyst/mahara-clients/htdo...", 45) at /home/robertl/clients/catalyst/mahara-clients/htdocs/lib/errors.php:521
  * error(8, "Array to string conversion", "/home/robertl/clients/catalyst/mahara-clients/htdo...", 45, array(size 7)) at /home/robertl/clients/catalyst/mahara-clients/htdocs/lib/adodb/adodb-exceptions.inc.php:45
  * ADODB_Exception->__construct("postgres8", "adodb_throw", -1, "ERROR: invalid input syntax for integer: "Array"", "SELECT "member"
        FROM "group_member"
      ...", array(size 1), object(ADODB_postgres8)) at /home/robertl/clients/catalyst/mahara-clients/htdocs/lib/adodb/adodb-exceptions.inc.php:80
  * adodb_throw("postgres8", "adodb_throw", -1, "ERROR: invalid input syntax for integer: "Array"", "SELECT "member"
        FROM "group_member"
      ...", array(size 1), object(ADODB_postgres8)) at /home/robertl/clients/catalyst/mahara-clients/htdocs/lib/adodb/adodb.inc.php:313
  * ADODB_TransMonitor("postgres8", "adodb_throw", -1, "ERROR: invalid input syntax for integer: "Array"", "SELECT "member"
        FROM "group_member"
      ...", array(size 1), object(ADODB_postgres8)) at /home/robertl/clients/catalyst/mahara-clients/htdocs/lib/adodb/adodb.inc.php:1264
  * ADOConnection->_Execute("SELECT "member"
        FROM "group_member"
      ...", array(size 1)) at /home/robertl/clients/catalyst/mahara-clients/htdocs/lib/adodb/adodb.inc.php:1224
  * ADOConnection->Execute("SELECT "member"
        FROM "group_member"
      ...", array(size 1)) at /home/robertl/clients/catalyst/mahara-clients/htdocs/lib/adodb/adodb.inc.php:1714
  * ADOConnection->GetCol("SELECT "member"
        FROM "group_member"
      ...", array(size 1)) at /home/robertl/clients/catalyst/mahara-clients/htdocs/lib/dml.php:891
  * get_column_sql("SELECT "member"
        FROM "group_member"
      ...", array(size 1)) at /home/robertl/clients/catalyst/mahara-clients/htdocs/lib/group.php:1605
  * group_get_admin_ids(array(size 1)) at /home/robertl/clients/catalyst/mahara-clients/htdocs/artefact/file/lib.php:1877
  * ArtefactTypeFile::notify_groups_threshold_exceeded(array(size 1)) at /home/robertl/clients/catalyst/mahara-clients/htdocs/artefact/file/lib.php:439
  * PluginArtefactFile::eventlistener_savedeleteartefact("deleteartefact", object(ArtefactTypeFile)) at /home/robertl/clients/catalyst/mahara-clients/htdocs/lib/mahara.php:1789
  * call_static_method("PluginArtefactFile", "eventlistener_savedeleteartefact", "deleteartefact", object(ArtefactTypeFile)) at /home/robertl/clients/catalyst/mahara-clients/htdocs/lib/mahara.php:2084
  * handle_event("deleteartefact", object(ArtefactTypeFile), array(size 8)) at /home/robertl/clients/catalyst/mahara-clients/htdocs/artefact/lib.php:719
  * ArtefactType->delete() at /home/robertl/clients/catalyst/mahara-clients/htdocs/artefact/file/lib.php:1363
  * ArtefactTypeFile->delete() at /home/robertl/clients/catalyst/mahara-clients/htdocs/artefact/lib.php:702
  * ArtefactType->delete() at /home/robertl/clients/catalyst/mahara-clients/htdocs/artefact/file/lib.php:2003
  * ArtefactTypeFolder->delete() at /home/robertl/clients/catalyst/mahara-clients/htdocs/lib/user.php:1612
  * delete_user("4839") at /home/robertl/clients/catalyst/mahara-clients/htdocs/admin/cli/delete_inactive_users.php:154

The problem is the group_get_admin_ids() is called with an array rather than an id

Robert Lyon (robertl-9) wrote :
Changed in mahara:
importance: Undecided → Low
importance: Low → Medium
milestone: none → 18.10.0
status: New → Confirmed
Changed in mahara:
status: Confirmed → In Progress

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

commit 9eefc1c84dc98079844390bb56f7f89f3c5f5ce3
Author: Robert Lyon <email address hidden>
Date: Thu Apr 19 16:00:22 2018 +1200

Bug 1765264: Group id not needed to be array for group_get_admin_ids()

A mistake made in the patch for Bug 1367539

behatnotneeded

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

Changed in mahara:
status: In Progress → Fix Committed
Changed in mahara:
status: Fix Committed → Fix Released
Robert Lyon (robertl-9) on 2019-01-29
no longer affects: mahara/18.10
Mahara Bot (dev-mahara) wrote :

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

Reviewed: https://reviews.mahara.org/9498
Committed: https://git.mahara.org/mahara/mahara/commit/cba094b56b9333dacbb2e19839561577d6162d4e
Submitter: Cecilia Vela Gurovic (<email address hidden>)
Branch: 17.10_STABLE

commit cba094b56b9333dacbb2e19839561577d6162d4e
Author: Robert Lyon <email address hidden>
Date: Thu Apr 19 16:00:22 2018 +1200

Bug 1765264: Group id not needed to be array for group_get_admin_ids()

A mistake made in the patch for Bug 1367539

behatnotneeded

Change-Id: If0b27c356887483532693153f0b8936b7d12eb14
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 9eefc1c84dc98079844390bb56f7f89f3c5f5ce3)

Mahara Bot (dev-mahara) wrote :

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

commit f7676dbd11500e76450c80d16f335b6911e72b2b
Author: Robert Lyon <email address hidden>
Date: Thu Apr 19 16:00:22 2018 +1200

Bug 1765264: Group id not needed to be array for group_get_admin_ids()

A mistake made in the patch for Bug 1367539

behatnotneeded

Change-Id: If0b27c356887483532693153f0b8936b7d12eb14
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 9eefc1c84dc98079844390bb56f7f89f3c5f5ce3)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers