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.
Reviewed: https:/ /reviews. mahara. org/5808 /git.mahara. org/mahara/ mahara/ commit/ 59b558462114ea0 af95b7e530779fd 324406377b
Committed: https:/
Submitter: Robert Lyon (<email address hidden>)
Branch: 1.10_STABLE
commit 59b558462114ea0 af95b7e530779fd 324406377b
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: I264f72e3a89042 93d78909410f68b 29f2c78db3c