Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined property: stdClass::$branch #48

Open
lbailey-ucsf opened this issue Oct 15, 2024 · 1 comment · May be fixed by #49
Open

Undefined property: stdClass::$branch #48

lbailey-ucsf opened this issue Oct 15, 2024 · 1 comment · May be fixed by #49

Comments

@lbailey-ucsf
Copy link

During a fresh install of Moodle 4.4.3, diary master branch, tag v.3.8.0, throws "Undefined property: stdClass::$branch" on line 166 of mod/diary/lib.php, effectively halting the install.

/**
 * Indicates API features that the diary supports.
 *
 * @uses FEATURE_MOD_PURPOSE:
 * @uses FEATURE__BACKUP_MOODLE2
 * @uses FEATURE_COMPLETION_TRACKS_VIEWS
 * @uses FEATURE_GRADE_HAS_GRADE
 * @uses FEATURE_GRADE_OUTCOMES
 * @uses FEATURE_GROUPS
 * @uses FEATURE_GROUPINGS
 * @uses FEATURE_GROUPMEMBERSONLY
 * @uses FEATURE_MOD_INTRO
 * @uses FEATURE_RATE
 * @uses FEATURE_SHOW_DESCRIPTION
 * @param string $feature FEATURE_xx constant for requested feature.
 * @return mixed True if module supports feature, null if doesn't know.
 */
function diary_supports($feature) {
    global $CFG;
    **if ((int)$CFG->branch > 311) {**
        if ($feature === FEATURE_MOD_PURPOSE) {
            return MOD_PURPOSE_COLLABORATION;
        }
    }
    switch ($feature) {
        case FEATURE_BACKUP_MOODLE2:
            return true;
        case FEATURE_COMPLETION_TRACKS_VIEWS:
            return true;
        case FEATURE_GRADE_HAS_GRADE:
@lbailey-ucsf
Copy link
Author

Adding screenshots for more context. The issue occurs during a fresh install of Moodle on the /user/editadvanced.php page. When installing Moodle 4.3.8 it's a warning. When installing 4.4.3, it's a error.
Screenshot 2024-10-18 at 10-39-11 Whoops! There was an error
Screenshot 2024-10-18 at 10-13-12 This page should automatically redirect  If nothing is happening please use the continue link below  Moodle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant