Permalink
Browse files

Merge branch 'w15_MDL-32308_m23_sharing' of git://github.com/skodak/m…

…oodle
  • Loading branch information...
2 parents f930cf6 + 5b244e2 commit 756d5f761050c182d523a1e9fbec39c2449653b8 Sam Hemelryk committed Apr 9, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/enrollib.php
View
@@ -264,8 +264,8 @@ function enrol_sharing_course($user1, $user2) {
function enrol_get_shared_courses($user1, $user2, $preloadcontexts = false, $checkexistsonly = false) {
global $DB, $CFG;
- $user1 = !empty($user1->id) ? $user1->id : $user1;
- $user2 = !empty($user2->id) ? $user2->id : $user2;
+ $user1 = isset($user1->id) ? $user1->id : $user1;
+ $user2 = isset($user2->id) ? $user2->id : $user2;
if (empty($user1) or empty($user2)) {
return false;

0 comments on commit 756d5f7

Please sign in to comment.