Moodle

Unknown column 'Array' in 'where clause' under /forum/index.php

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 2.0
  • Fix Version/s: 2.0
  • Component/s: Forum
  • Labels:
    None
  • Environment:
    Suse 11.1 Apache 2.0 Mysql 5, php 5.2.8
  • Database:
    MySQL
  • URL:
    mod/forum/discuss.php?
  • Affected Branches:
    MOODLE_20_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

Description

Unknown column 'Array' in 'where clause' thrown, when a student clicks forum link on navigation bar.

Full error result;

Unknown column 'Array' in 'where clause'

SELECT COUNT(d.id) FROM mdl_forum_discussions d WHERE d.groupid IN (Array) AND d.forum = ? LIMIT 0, 1
[array ( 0 => '11', )]

  • line 305 of lib/dml/moodle_database.php: dml_read_exception thrown
  • line 558 of lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 1125 of lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
  • line 2381 of mod/forum/lib.php: call to moodle_database->get_field_sql()
  • line 162 of mod/forum/index.php: call to forum_count_discussions()

to recreate the event,
create a forum, post a discussion, login as a student go to forum, click on topic and click forum on navigation bar.

Activity

Hide
Petr Škoda (skodak) added a comment -

fixed, thanks

Show
Petr Škoda (skodak) added a comment - fixed, thanks

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: