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

Misspelled variable name in reneder.php #37

Open
drachels opened this issue Jan 29, 2023 · 0 comments
Open

Misspelled variable name in reneder.php #37

drachels opened this issue Jan 29, 2023 · 0 comments

Comments

@drachels
Copy link

Here lately, I have started to occasionally see this warning:
Warning: Creating default object from empty value in /var/www/html/moodledev/mod/tracker/renderer.php on line 486
To me, it appears that the variable name in that line of code is misspelled. The line number varies depending on the tracker version, but it is third line from the bottom of this bit of code:
if (!empty($history)) {
foreach ($history as $owner) {
$histtpl = new StdClass;
$user = $DB->get_record('user', array('id' => $owner->userid));
$bywhom = $DB->get_record('user', array('id' => $owner->bywhomid));

            $histtpl->date = userdate($owner->timeassigned);
            $histtpl->user = $this->user($user);
            $histtpl->username = fullname($bywhom);
            $teplate->history[] = $histtpl;  <- The error appears to be here and should be $template.
        }
    }
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

No branches or pull requests

1 participant