← Back to team overview

mahara-contributors team mailing list archive

[Bug 1799852] Re: View site statistics has error if there are no blocks

 

It will need to be checked if the issue also occurs in Mahara 18.04 and
17.10.

** Also affects: mahara/17.10
   Importance: Undecided
       Status: New

** Also affects: mahara/19.04
   Importance: Undecided
       Status: New

** Also affects: mahara/18.10
   Importance: Undecided
     Assignee: Rebecca Blundell (rjb-dev)
       Status: New

** Also affects: mahara/18.04
   Importance: Undecided
       Status: New

** Changed in: mahara/19.04
       Status: New => In Progress

** Changed in: mahara/18.10
       Status: New => Confirmed

** Changed in: mahara/19.04
    Milestone: None => 19.04.0

** Changed in: mahara/18.10
    Milestone: None => 18.10.1

** Changed in: mahara/19.04
   Importance: Undecided => Medium

** Changed in: mahara/18.10
   Importance: Undecided => Medium

-- 
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/1799852

Title:
  View site statistics has error if there are no blocks

Status in Mahara:
  Confirmed
Status in Mahara 17.10 series:
  New
Status in Mahara 18.04 series:
  New
Status in Mahara 18.10 series:
  Confirmed
Status in Mahara 19.04 series:
  In Progress

Bug description:
  If you install a new site and go to
  http://mahara/admin/users/statistics.php when there are no blocks
  saved, you see

  "Invalid argument supplied for foreach()",
  "~/code/mahara/htdocs/lib/stati...", 210, array(size 18)) at
  ~code/mahara/htdocs/lib/statistics.php:210, referer:
  http://mahara/admin/index.php

  There is an invalid argument in this case as the value of $blocktypecounts is false and the code says:
  foreach ($blocktypecounts as $blocktype) {
  ...get the details...
  }
  We should put it in an if statement to avoid the error.

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


References