Warnings in renderers.php with Moodle 3.1

Issue #683 resolved
ericeisenhart created an issue

Using Moodle 3.1, I get these warnings:

Notice: Undefined variable: messages in .../theme/adaptable/renderers.php on line 947

Warning: Invalid argument supplied for foreach() in .../theme/adaptable/renderers.php on line 947

Comments (4)

  1. Info 3bits

    Please, could you provide more information? Adaptable version? What steps to follow to replicate the error?

  2. ericeisenhart reporter

    Version: theme_adaptable_moodle32_2017050200 aka 2017050200 or "1.3.2". With both moodle 3.1.6 and moodle 3.0.10. Downloaded from download.moodle.org on May 8th as latest version for each of those versions of moodle.

    Steps to reproduce: 1. Install theme_adaptable on moodle 3.1 or 3.0. 2. In Site Admin / Debugging, set "debug" to "normal" or higher. 3. In Site Admin/ Appearance / Themes / Theme Selector, set Adaptable as default theme. 4. Click "home" button.

    From looking at the code, I believe you need to be logged in to see this error.

    That line of code in the warning is foreach ($messages as $message) {, but that is the only place $messages shows up in theme_adaptable. It's inside of a if ($CFG->version < 2016120500) { conditional for Moodle 3.1 and older. Looks like maybe a $messages = $this->get_user_messages(); got removed that shouldn't have been removed?

  3. Log in to comment