Fix syntax error in PHP 5.3

Bug #1478374 reported by Son Nguyen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Son Nguyen
15.10
Fix Released
Medium
Son Nguyen

Bug Description

Version: master(15.10)

I got the error if using PHP 5.3

Parse error: syntax error, unexpected '[', expecting ')' in /home/sonn/code/mahara/master/htdocs/lib/web.php on line 2903

Son Nguyen (ngson2000)
description: updated
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/5005
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/658ed4a476260a316eeb54ad66899367935109c8
Submitter: Son Nguyen (<email address hidden>)
Branch: master

commit 658ed4a476260a316eeb54ad66899367935109c8
Author: Son Nguyen <email address hidden>
Date: Fri Jul 24 10:53:42 2015 +1200

Add LiveUser->get_primary_institution(). Bug 1478374
and fix error of using [] with a function in PHP 5.3

Change-Id: I0199d6495af7f9df3c1935d6581a13f087b6dea1

Robert Lyon (robertl-9)
Changed in mahara:
importance: Undecided → Medium
milestone: none → 15.10.0
status: New → Fix Committed
Revision history for this message
Son Nguyen (ngson2000) wrote :

I found one more place:

 PHP Parse error: syntax error, unexpected '[', expecting ')' in /var/www/mahara/master/htdocs/webservice/admin/index.php on line 1034

Changed in mahara:
assignee: nobody → Son Nguyen (ngson2000)
status: Fix Committed → 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/5231

Revision history for this message
Aaron Wells (u-aaronw) wrote :

Make sure to backport this to 15.04, because the same code exists there.

no longer affects: mahara/15.04
Revision history for this message
Aaron Wells (u-aaronw) wrote :

Actually, no, on further reflection this problem is new to 15.10. Mahara 15.04 has the same webservices_master_switch_form(), but it uses the array as it is returned, whereas Mahara 15.10 only needs a part of the array, due to a change in the surrounding Pieform (probably as part of the big styling overhaul).

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

Reviewed: https://reviews.mahara.org/5231
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/dfc599d2a49395628a1fa6a6a26f3065418c0a52
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit dfc599d2a49395628a1fa6a6a26f3065418c0a52
Author: Son Nguyen <email address hidden>
Date: Tue Sep 8 10:21:47 2015 +1200

Fix error of using [] with a function in PHP 5.3. Bug 1478374

behatnotneeded

Change-Id: I2d9885973a308088ecae4352621f569cd5f0aca1

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.