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

Wrong parameter count for array_slice() in datalib.php (PHP 4 only)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.8.2
    • Fix Version/s: 1.8.4
    • Component/s: Libraries
    • Labels:
      None
    • Environment:
      Mac OS X 10.3.9, PHP 4.4.4
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE

      Description

      Warning: Wrong parameter count for array_slice() in /Library/WebServer/Documents/moodle/lib/datalib.php on line 837

      According to the PHP docs, the fourth parameter to array_slice was added in PHP 5.0.2. I'm running PHP 4.

      This is in Moodle 1.8.2 latest (not sure which date it was released, but the bug is confirmed by someone with a different version); Moodle 1.8.2 stable (as of today anyway) is OK.

      To reproduce:

      1. As admin, browser the list of all users (Users/Accounts/Browsel list of users in Site Administration tab)
      2. Click on the name of a user to visit user/view.php

      I may be understating the severity of the error; with debugging off I don't see a problem, but I spoke to someone who I believe encountered a blank page.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              poltawski Dan Poltawski
              Reporter:
              geofg Geoffrey Glass
              Tester:
              Nobody
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Jan/08