Commit 38a9d9a8 authored by Robert Lyon's avatar Robert Lyon

Bug 1521409: get_record() needs to die

When we are trying to fetch a page by urlid and there are duplicates
as the pages will not be the same

behatnotneeded

Change-Id: I82068aefc99e051a4ecd3aceb5655fc96631b0f5
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 3db4ecaf
......@@ -236,7 +236,8 @@ class View {
SELECT v.*
FROM {view} v JOIN {usr} u ON v.owner = u.id
WHERE v.urlid = ? AND u.urlid = ?',
array($id['urlid'], $id['ownerurlid'])
array($id['urlid'], $id['ownerurlid']),
ERROR_MULTIPLE
);
if (empty($tempdata)) {
throw new ViewNotFoundException(get_string('viewnotfoundbyname', 'error', $id['urlid'], $id['ownerurlid']));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment