Skip to content

Commit

Permalink
Merge branch 'MDL-50177_master' of git://github.com/dmonllao/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed May 18, 2015
2 parents 7ab171f + 729a6c5 commit 14dbf56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions availability/condition/completion/classes/condition.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ class condition extends \core_availability\condition {
*/
public function __construct($structure) {
// Get cmid.
if (isset($structure->cm) && is_int($structure->cm)) {
$this->cmid = $structure->cm;
if (isset($structure->cm) && is_number($structure->cm)) {
$this->cmid = (int)$structure->cm;
} else {
throw new \coding_exception('Missing or invalid ->cm for completion condition');
}
Expand Down

0 comments on commit 14dbf56

Please sign in to comment.