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

Overflow problems on pgsql driver with tests using PHP_INT_MAX

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 2.0.3
    • 2.0.2
    • Unit tests
    • None
    • MOODLE_20_STABLE
    • MOODLE_20_STABLE

      // test 2 tables with aliases and limits with order bys (limit which is out of range)
      $records = $DB->get_records_sql($sql, null, 21098765432109876543210, 2); // Skip all courses
      $this->assertEqual(0, count($records));

      // test 2 tables with aliases and limits with order bys (limit which is out of range)
      $records = $DB->get_records_sql($sql, null, 21098765432109876543210, 21098765432109876543210); // Skip all courses
      $this->assertEqual(0, count($records));

      these tests are wrong, you can not type large numbers like this in PHP.

            skodak Petr Skoda
            skodak Petr Skoda
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.