Skip to content

Commit

Permalink
MDL-37411 Note Module: additional patch to fixed undefined property f…
Browse files Browse the repository at this point in the history
…or stable branches
  • Loading branch information
Rossiani Wijaya authored and Aparup Banerjee committed Mar 7, 2013
1 parent e13f286 commit a28da5d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion notes/lib.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -100,10 +100,11 @@ function note_save(&$note) {
// insert new note // insert new note
$note->created = $note->lastmodified; $note->created = $note->lastmodified;
$id = $DB->insert_record('post', $note); $id = $DB->insert_record('post', $note);
$note = $DB->get_record('post', array('id'=>$id)); $note = note_load($id);
} else { } else {
// update old note // update old note
$DB->update_record('post', $note); $DB->update_record('post', $note);
$note = note_load($note->id);
} }
unset($note->module); unset($note->module);
return true; return true;
Expand Down

0 comments on commit a28da5d

Please sign in to comment.