mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
Merge branch 'MDL-63658-master-2' of https://github.com/snake/moodle
This commit is contained in:
commit
2205ecc2b6
@ -87,7 +87,7 @@ class provider implements \core_privacy\local\metadata\provider, \core_privacy\l
|
||||
WHERE userid = :userid
|
||||
AND component = :component";
|
||||
if (!is_null($itemtype)) {
|
||||
$sql .= "AND itemtype = :itemtype";
|
||||
$sql .= " AND itemtype = :itemtype";
|
||||
}
|
||||
$params = ['userid' => $userid, 'component' => $component, 'itemtype' => $itemtype];
|
||||
$contextlist->add_from_sql($sql, $params);
|
||||
|
@ -201,7 +201,7 @@ class favourite_repository_testcase extends advanced_testcase {
|
||||
// Try to get a favourite we know doesn't exist.
|
||||
// We expect an exception in this case.
|
||||
$this->expectException(dml_exception::class);
|
||||
$favouritesrepo->find(1);
|
||||
$favouritesrepo->find(0);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -414,7 +414,7 @@ class favourite_repository_testcase extends advanced_testcase {
|
||||
$this->assertTrue($favouritesrepo->exists($createdfavourite->id));
|
||||
|
||||
// Verify exists returns false for non-existent favourite.
|
||||
$this->assertFalse($favouritesrepo->exists(1));
|
||||
$this->assertFalse($favouritesrepo->exists(0));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user