Moodle

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

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Trivial 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.

Issue Links

Activity

Hide
Geoffrey Glass added a comment -

There's no blank screen problem, so this is just a warning invisible unless debug is on.

Show
Geoffrey Glass added a comment - There's no blank screen problem, so this is just a warning invisible unless debug is on.
Hide
Dan Poltawski added a comment -

Thanks for the report, this is resolved in CVS

Show
Dan Poltawski added a comment - Thanks for the report, this is resolved in CVS

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: