Skip to content

DB error on API requests page #1

@mudrd8mz

Description

@mudrd8mz

The page Site administration ► Plugins ► Enrolments ► Manage Arlo ► API requests seems to use MySQL specific SQL. When the site is running on PostgreSQL, I am getting:

Error reading from database

Debug info: ERROR: argument of WHERE must be type boolean, not type integer
LINE 4: WHERE 1
^
SELECT
*
FROM mdl_enrol_arlo_requestlog
WHERE 1
ORDER BY timelogged DESC LIMIT 50 OFFSET 0
[array (
)]
Error code: dmlreadexception

Stack trace:
line 479 of /lib/dml/moodle_database.php: dml_read_exception thrown
line 250 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
line 800 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
line 1593 of /lib/tablelib.php: call to pgsql_native_moodle_database->get_records_sql()
line 1614 of /lib/tablelib.php: call to table_sql->query_db()
line 28 of /enrol/arlo/admin/apirequests.php: call to table_sql->out()

In Moodle, conditions like this are typically implemented as

WHERE 1 = 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions