Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-69516

install_database.php error Undefined property: stdClass::$branch

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 3.9.1
    • Installation
    • MOODLE_39_STABLE
    • MDL-69516-undef_property_branch
    • Hide

      Steps

      1. Prepare an uninstalled Moodle site with configured config.php. For example, install a Moodle site using the web interface so that config.php is created. After the installation completes, drop and re-create the database (e.g. DROP DATABASE test39; CREATE DATABASE test39 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; – be certain you are dropping the intended database).

      2. Edit config.php adding the following lines:

      @error_reporting(E_ALL | E_STRICT);
      @ini_set('display_errors', '1');
      $CFG->debug = (E_ALL | E_STRICT);
      $CFG->debugdisplay = 1;

      3. Run admin/cli/install_database.php as the web server user specifying the mandatory parameters, e.g.:

      cd /path/to/moodle

      sudo -u apache php admin/cli/install_database.php --adminpass=Password-1 --adminemail=admin@example.com --agree-license --fullname=Test\ Site --shortname=Home

      Expected results

      The script should run and there should be no PHP notices or errors.

      Show
      Steps 1. Prepare an uninstalled Moodle site with configured config.php . For example, install a Moodle site using the web interface so that config.php is created. After the installation completes, drop and re-create the database (e.g. DROP DATABASE test39; CREATE DATABASE test39 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; – be certain you are dropping the intended database). 2. Edit config.php adding the following lines: @error_reporting(E_ALL | E_STRICT); @ini_set('display_errors', '1'); $CFG->debug = (E_ALL | E_STRICT); $CFG->debugdisplay = 1; 3. Run admin/cli/install_database.php as the web server user specifying the mandatory parameters, e.g.: cd /path/to/moodle sudo -u apache php admin/cli/install_database.php --adminpass=Password-1 --adminemail=admin@example.com --agree-license --fullname=Test\ Site --shortname=Home Expected results The script should run and there should be no PHP notices or errors.

      With a configured config.php you can use admin/cli/install_database.php to install Moodle. If debugging is enabled in that config.php you get the warning (Moodle 3.9.1+ Build: 20200814):

      {{# sudo -u apache php admin/cli/install_database.php --agree-license --fullname=...
      PHP Notice: Undefined property: stdClass::$branch in /var/www/scratch39.dell/moodle/lib/classes/plugin_manager.php on line 755

      Notice: Undefined property: stdClass::$branch in /var/www/scratch39.dell/moodle/lib/classes/plugin_manager.php on line 755
      -------------------------------------------------------------------------------
      == Setting up database ==
      ⋮}}

      The installation completes successfully.

            leonstr Leon Stringer
            leonstr Leon Stringer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.