Find all Errors in code: Only variables should be passed by reference

Bug #1648679 reported by Cecilia Vela Gurovic on 2016-12-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Medium
Cecilia Vela Gurovic
16.04
Medium
Unassigned
16.10
Medium
Unassigned
17.04
Medium
Cecilia Vela Gurovic

Bug Description

Need to search and fix all lines of code that throw error:
"Only variables should be passed by reference"

this message is shown when a function is called that needs parameters passed by reference but instead of a variable, another function called is passed. In most cases it works, but as it says here
https://bugs.php.net/bug.php?id=48937 this might lead to memory corruptions in some cases.

Changed in mahara:
assignee: nobody → Cecilia Vela Gurovic (ceciliavg)

attached instructions for testing

Changed in mahara:
status: New → In Progress
importance: Undecided → Medium
milestone: none → 17.04.0

Do we need to fix this for 16.04 and 16.10 as well? I did see it come up when uploading mp4 files, but not image files.

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

commit c29f4ef478efd7af27680c4ad4b769f7c2e59fe7
Author: Cecilia Vela Gurovic <email address hidden>
Date: Fri Dec 9 16:11:16 2016 +1300

Bug 1648679: Avoiding "Passed by reference" error

Fixed lines of code that threw the error
"Only variables should be passed by reference"
and other errors found.

behatnotneeded

Change-Id: I23e6a3c1b2ef97bf2cae29c15814fcdb79d5676f

Robert Lyon (robertl-9) on 2017-01-11
Changed in mahara:
status: In Progress → Fix Committed
Mahara Bot (dev-mahara) wrote :

Patch for "16.04_STABLE" branch: https://reviews.mahara.org/7387

Reviewed: https://reviews.mahara.org/7387
Committed: https://git.mahara.org/mahara/mahara/commit/65f3a4ea04b3b3ef3d4806b60b91a43216de2798
Submitter: Robert Lyon (<email address hidden>)
Branch: 16.04_STABLE

commit 65f3a4ea04b3b3ef3d4806b60b91a43216de2798
Author: Cecilia Vela Gurovic <email address hidden>
Date: Fri Dec 9 16:11:16 2016 +1300

Bug 1648679: Avoiding "Passed by reference" error

Fixed lines of code that threw the error
"Only variables should be passed by reference"
and other errors found.

behatnotneeded

Change-Id: I23e6a3c1b2ef97bf2cae29c15814fcdb79d5676f
(cherry picked from commit c29f4ef478efd7af27680c4ad4b769f7c2e59fe7)

Reviewed: https://reviews.mahara.org/7386
Committed: https://git.mahara.org/mahara/mahara/commit/4c36ab05050572bf677a8ad190045ccfe3eb86e7
Submitter: Robert Lyon (<email address hidden>)
Branch: 16.10_STABLE

commit 4c36ab05050572bf677a8ad190045ccfe3eb86e7
Author: Cecilia Vela Gurovic <email address hidden>
Date: Fri Dec 9 16:11:16 2016 +1300

Bug 1648679: Avoiding "Passed by reference" error

Fixed lines of code that threw the error
"Only variables should be passed by reference"
and other errors found.

behatnotneeded

Change-Id: I23e6a3c1b2ef97bf2cae29c15814fcdb79d5676f
(cherry picked from commit c29f4ef478efd7af27680c4ad4b769f7c2e59fe7)

Mahara Bot (dev-mahara) wrote :

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

commit d0df443b314553d1397872b71b1d72aa0a06217b
Author: Robert Lyon <email address hidden>
Date: Tue Jan 24 14:34:51 2017 +1300

Bug 1648679: Avoiding "Passed by reference" error

In the add secretURL for a collection

behatnotneeded

Change-Id: If00893b96f38f9442ddd718dd2a39f245c839f84
Signed-off-by: Robert Lyon <email address hidden>

Reviewed: https://reviews.mahara.org/7460
Committed: https://git.mahara.org/mahara/mahara/commit/2cfe588e5b01cb8fae2d3eeb12791939eb2ab9a9
Submitter: Robert Lyon (<email address hidden>)
Branch: 16.10_STABLE

commit 2cfe588e5b01cb8fae2d3eeb12791939eb2ab9a9
Author: Robert Lyon <email address hidden>
Date: Tue Jan 24 14:34:51 2017 +1300

Bug 1648679: Avoiding "Passed by reference" error

In the add secretURL for a collection

behatnotneeded

Change-Id: If00893b96f38f9442ddd718dd2a39f245c839f84
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit d0df443b314553d1397872b71b1d72aa0a06217b)

Reviewed: https://reviews.mahara.org/7461
Committed: https://git.mahara.org/mahara/mahara/commit/6688838ea92624662ed6320debfc54e6cef228ed
Submitter: Robert Lyon (<email address hidden>)
Branch: 16.04_STABLE

commit 6688838ea92624662ed6320debfc54e6cef228ed
Author: Robert Lyon <email address hidden>
Date: Tue Jan 24 14:34:51 2017 +1300

Bug 1648679: Avoiding "Passed by reference" error

In the add secretURL for a collection

behatnotneeded

Change-Id: If00893b96f38f9442ddd718dd2a39f245c839f84
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit d0df443b314553d1397872b71b1d72aa0a06217b)
(cherry picked from commit 2cfe588e5b01cb8fae2d3eeb12791939eb2ab9a9)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers