Moodle
  1. Moodle
  2. MDL-32071

Fatal errors caused by calls to get_db_family() which should be get_dbfamily()

    Details

    • Testing Instructions:
      Hide

      1/ enable experimental $CFG->forum_usetextsearches = true;
      2/ go to advanced forum search ( no idea where is the link, I edited forum/search.php?id=courseid")
      3/ try to search
      4/ repeat 1-3 with both postgresql and mysql
      4/ no idea how to test the wiki upgrade, sorry

      Show
      1/ enable experimental $CFG->forum_usetextsearches = true; 2/ go to advanced forum search ( no idea where is the link, I edited forum/search.php?id=courseid") 3/ try to search 4/ repeat 1-3 with both postgresql and mysql 4/ no idea how to test the wiki upgrade, sorry
    • Workaround:
      Hide

      Change calls to get_db_family() to be get_dbfamily()

      Show
      Change calls to get_db_family() to be get_dbfamily()
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w12_MDL-32071_m23_dbfamily
    • Rank:
      38765

      Description

      In all version of Moodle 2.x, the following files have occurrences of call to non-existing function get_db_family():

      lib/searchlib.php:362: if ($DB->get_db_family() != 'mysql') {
      lib/searchlib.php:369: if ($DB->get_db_family() == 'mysql') {
      mod/wiki/db/migration/wiki/ewikimoodlelib.php:195: switch ($DB->get_db_family()) {

      Fix is to change it to get_dbfamily(). This problem is the same as was reported in MDL-19620.

        Activity

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: