error when navigating to My groups page
Bug #1741814 reported by
Rebecca Blundell
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
High
|
Rebecca Blundell |
Bug Description
This may be related to PHP 7.1 as it seems to be peculiar to my system. But on the current master branch when I choose Groups from the main menu, I see an error and a call stack. It doesn't seem to cause any other problems.
I looked into it and found that the code is trying to divide the word 'all' by 10, hence the error, but I'm not sure why this is.
Changed in mahara: | |
milestone: | none → 18.04.0 |
assignee: | nobody → Rebecca Blundell (rjb-dev) |
importance: | Undecided → High |
status: | New → Confirmed |
Changed in mahara: | |
status: | Confirmed → In Progress |
Changed in mahara: | |
status: | In Progress → Fix Committed |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
It looks like it is a php 7.1 issue.
The line that is throwing the error is trying to do an arithmetic operation on a string that it's not a number:
$offset = (int)($offset / $groupsperpage) * $groupsperpage;
where $offset='all'
And according to the php documentation, with 7.1 we will receive these warnings when performing an arithmetic operation trying to coerse invalid strings:
http:// php.net/ manual/ en/migration71. other-changes. php