View site statistics has error if there are no blocks
Bug #1799852 reported by
Rebecca Blundell
This bug report is a duplicate of:
Bug #1800961: reports page displays error message with an empty DB.
Edit
Remove
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Confirmed
|
Medium
|
Rebecca Blundell | ||
17.10 |
New
|
Undecided
|
Unassigned | ||
18.04 |
New
|
Undecided
|
Unassigned | ||
18.10 |
Confirmed
|
Medium
|
Rebecca Blundell | ||
19.04 |
In Progress
|
Medium
|
Unassigned |
Bug Description
If you install a new site and go to http://
"Invalid argument supplied for foreach()", "~/code/
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.
Changed in mahara: | |
assignee: | nobody → Rebecca Blundell (rjb-dev) |
To post a comment you must log in.
Patch for "master" branch: https:/ /reviews. mahara. org/9273