"aretefactid" is not defined error on db upgrade

Bug #1814954 reported by Robert Lyon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Unassigned

Bug Description

On upgrade we sometimes get the error:

 [WAR] 66 (lib/db/upgrade.php:893) Undefined index: artefactid

This is due to trying to spot the array key 'artefactid' whn it's value is null

But if 'artefactid' is not set at all we get the error.

Need to use array_key_exists() instead of is_null()

As the upgrade will still complete I will mark as medium bug

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

Reviewed: https://reviews.mahara.org/9524
Committed: https://git.mahara.org/mahara/mahara/commit/ddd0ac8a2820495cf99465b70932eccd4e807cb4
Submitter: Cecilia Vela Gurovic (<email address hidden>)
Branch: master

commit ddd0ac8a2820495cf99465b70932eccd4e807cb4
Author: Robert Lyon <email address hidden>
Date: Thu Feb 7 08:49:36 2019 +1300

Bug 1814954: Getting "Undefined index: artefactid" on upgrade

Due to checking for a null array vaue incorrectly

behatnotneeded

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

Changed in mahara:
status: In Progress → Fix Committed
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.