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

Error when searching a database with no entries

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Create a new Database, with a text input field, or a text area field.
      2. Don't Add any entries.
      3. Go to the Search tab and do a search on the text or text area.
      4. You should see message: "No entries in database" and not "Coding error detected, it must be fixed by a programmer: moodle_database::get_in_or_equal() does not accept empty arrays".
      Show
      Create a new Database, with a text input field, or a text area field. Don't Add any entries. Go to the Search tab and do a search on the text or text area. You should see message: "No entries in database" and not "Coding error detected, it must be fixed by a programmer: moodle_database::get_in_or_equal() does not accept empty arrays".
    • Affected Branches:
      MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_29_STABLE, MOODLE_30_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      wip-MDL-53538-master

      Description

      When you search in a database with one text field and with no entries you get the error: moodle_database::get_in_or_equal() does not accept empty arrays.

      To reproduce:
      1. Create a new Database, with a text input field, or a text area field.
      2. Don't Add any entry
      3. Search the text or text area
      4. Got the error message: Coding error detected, it must be fixed by a programmer: moodle_database::get_in_or_equal() does not accept empty arrays

      Work around:
      The Database creator should input a dummy text first, before someone keen to search, even they can't see anything in the list view, knowing nothing to search.

        Attachments

          Activity

            People

            Assignee:
            abgreeve Adrian Greeve
            Reporter:
            wenxin Wenxin Lu
            Peer reviewer:
            Simey Lameze
            Integrator:
            Dan Poltawski
            Tester:
            Marina Glancy
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              9/May/16