Moodle
  1. Moodle
  2. MDL-26987

Spam cleaner tool Incorrect number of query parameters error

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.0.3
    • Component/s: Administration
    • Labels:
    • Difficulty:
      Moderate
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Rank:
      17017

      Description

      Site administration>Reports>Spam cleaner.

      Steps taken
      Enter a set of keywords and click on search
      Or Click on Autodetect spam

      ERROR
      ERROR: Incorrect number of query parameters. Expected x, got 0.
      Where x is the number of keywords you typed plus one

      Stack trace:

      • line 697 of \lib\dml\moodle_database.php: dml_exception thrown
      • line 743 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->fix_sql_params()
      • line 165 of \admin\report\spamcleaner\index.php: call to mysqli_native_moodle_database->get_recordset_sql()
      • line 129 of \admin\report\spamcleaner\index.php: call to search_spammers()

      First look comments
      Clearly get_recordset_sql() is missing second set of arguments

        Activity

        Hide
        Helen Foster added a comment -

        Ankit, thanks for your report. Amending the summary so it's easier to find in a search.

        Show
        Helen Foster added a comment - Ankit, thanks for your report. Amending the summary so it's easier to find in a search.
        Hide
        Petr Škoda added a comment -

        Hello, this will be fixed in the next weekly build. Thanks for the report.

        Petr

        Show
        Petr Škoda added a comment - Hello, this will be fixed in the next weekly build. Thanks for the report. Petr
        Hide
        Petr Škoda added a comment -

        grrr, sorry for the noise...

        Show
        Petr Škoda added a comment - grrr, sorry for the noise...
        Hide
        Helen Foster added a comment -

        Confirming that this issue is fixed in this week's 2.0.2+.

        Show
        Helen Foster added a comment - Confirming that this issue is fixed in this week's 2.0.2+.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: