error when navigating to My groups page

Bug #1741814 reported by Rebecca Blundell
6
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.

Revision history for this message
Rebecca Blundell (rjb-dev) wrote :
Revision history for this message
Cecilia Vela Gurovic (ceciliavg) wrote :

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

Robert Lyon (robertl-9)
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
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/8453

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

Reviewed: https://reviews.mahara.org/8453
Committed: https://git.mahara.org/mahara/mahara/commit/3c3060d63d8a492da216453e9242a20743fa0f10
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 3c3060d63d8a492da216453e9242a20743fa0f10
Author: Rebecca Blundell <email address hidden>
Date: Thu Jan 18 13:28:03 2018 +1300

Bug 1741814: Fix call stack displayed on My Groups page

correct default value to 0

behatnotneeded

Change-Id: I3d249a5b7c820d601d6fabe1e3a45dec9fe00326

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
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.