Comment 26 for bug 1515929

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

Reviewed: https://reviews.mahara.org/5808
Committed: https://git.mahara.org/mahara/mahara/commit/59b558462114ea0af95b7e530779fd324406377b
Submitter: Robert Lyon (<email address hidden>)
Branch: 1.10_STABLE

commit 59b558462114ea0af95b7e530779fd324406377b
Author: Aaron Wells <email address hidden>
Date: Tue Nov 24 16:53:16 2015 +1300

Make get_record warn instead of dying, by default

Bug 1515929: Usually when we use get_record(), we're
querying against a record that has a uniqueness constraint
guaranteeing that it is unique, in which case the PHP
code that dies on non-uniqueness is redundant.

In the remaining cases, we're dealing with records
that for some reason can't have a uniqueness constraint,
and the dying just causes the site to entirely stop
working, when it would be more useful to have it continue
to work but throw a warning message to the logs.

behatnotneeded: Covered by existing test cases

Change-Id: I264f72e3a8904293d78909410f68b29f2c78db3c