Moodle
  1. Moodle
  2. MDL-31486

Date selector produce lot of PHP notice

    Details

    • Affected Branches:
      MOODLE_22_STABLE
    • Rank:
      38018

      Description

      Since I started to use a user profile field of type date my error log is full of
      PHP Notice: Undefined index: day in xxxxxxxxxxxx/lib/form/dateselector.php on line 230, referer: xxxxxxxxxxxxx/admin/user.php
      PHP Notice: Undefined index: month in xxxxxxxxxxxx/lib/form/dateselector.php on line 229, referer: xxxxxxxxxxxxx/admin/user.php

        Activity

        Hide
        Jean-Michel Vedrine added a comment -

        In fact this seemes to happend on page where there is a disabled date selector.

        Show
        Jean-Michel Vedrine added a comment - In fact this seemes to happend on page where there is a disabled date selector.
        Hide
        Michael de Raadt added a comment -

        Hi, Jean-Michel.

        Could you please provide some steps to replicate this?

        Is this only in user profile fields, or have you experienced this elsewhere?

        Show
        Michael de Raadt added a comment - Hi, Jean-Michel. Could you please provide some steps to replicate this? Is this only in user profile fields, or have you experienced this elsewhere?
        Hide
        Michael de Raadt added a comment - - edited

        I've got a few people watching this issue, so I assume Jean-Michel is not the only person with this problem.

        Can someone please provide some replication steps. If we cannot replicate the problem, it's hard for us to fix it.

        Show
        Michael de Raadt added a comment - - edited I've got a few people watching this issue, so I assume Jean-Michel is not the only person with this problem. Can someone please provide some replication steps. If we cannot replicate the problem, it's hard for us to fix it.
        Hide
        Phil Rennard added a comment -

        Hi Michael,

        I am running Moodle 2.2.2 (upgraded all the way from 1.9.6 or so) and experience this issue. For me, it is with debug (in Moodle site administration) level set to NORMAL and 'debugdisplay' set to yes.

        The only time I experience the error is when searching for users on the 'Browse list of users' page in Site Administration. When viewing profiles or just browsing the list without searching I don't seem to get any errors.

        I don't use any custom user profile fields unlike the original poster, it's all still as default.

        Show
        Phil Rennard added a comment - Hi Michael, I am running Moodle 2.2.2 (upgraded all the way from 1.9.6 or so) and experience this issue. For me, it is with debug (in Moodle site administration) level set to NORMAL and 'debugdisplay' set to yes. The only time I experience the error is when searching for users on the 'Browse list of users' page in Site Administration. When viewing profiles or just browsing the list without searching I don't seem to get any errors. I don't use any custom user profile fields unlike the original poster, it's all still as default.
        Hide
        Derek Runions added a comment -

        I am having the same problem with an installation of 2.0.4 (20110801) installed on Linux Virtual Server and I get the exact same error messages when I do a filtered user search.

        Please let me know if I can pass along some info that will help this process towards a solution

        Thanks ~ Derek

        Show
        Derek Runions added a comment - I am having the same problem with an installation of 2.0.4 (20110801) installed on Linux Virtual Server and I get the exact same error messages when I do a filtered user search. Please let me know if I can pass along some info that will help this process towards a solution Thanks ~ Derek
        Hide
        Marty Gilbert added a comment -

        Example form that throws the error(s) in question due to a disabled date_selector

        Show
        Marty Gilbert added a comment - Example form that throws the error(s) in question due to a disabled date_selector
        Hide
        Marty Gilbert added a comment -

        I have this issue on Moodle 2.1.1+ (Build: 20110811).

        Server:
        CentOS Linux release 6.0
        2.6.32-71.29.1.el6.x86_64

        Debugging level is set to DEVELOPER

        This occurs for me on custom written code when a form is submitted that has a disabled date_selector (see attached). The error(s) looks like:

        <snip>
        PHP Notice: Undefined index: month in /path/to/moodle/lib/form/dateselector.php on line 229
        PHP Notice: Undefined index: day in /path/to/moodle/lib/form/dateselector.php on line 230
        PHP Notice: Undefined index: month in /path/to/moodle/lib/form/dateselector.php on line 229
        PHP Notice: Undefined index: day in /path/to/moodle/lib/form/dateselector.php on line 230
        </snip>

        If the date_selector is enabled, no error is thrown.

        Show
        Marty Gilbert added a comment - I have this issue on Moodle 2.1.1+ (Build: 20110811). Server: CentOS Linux release 6.0 2.6.32-71.29.1.el6.x86_64 Debugging level is set to DEVELOPER This occurs for me on custom written code when a form is submitted that has a disabled date_selector (see attached). The error(s) looks like: <snip> PHP Notice: Undefined index: month in /path/to/moodle/lib/form/dateselector.php on line 229 PHP Notice: Undefined index: day in /path/to/moodle/lib/form/dateselector.php on line 230 PHP Notice: Undefined index: month in /path/to/moodle/lib/form/dateselector.php on line 229 PHP Notice: Undefined index: day in /path/to/moodle/lib/form/dateselector.php on line 230 </snip> If the date_selector is enabled, no error is thrown.
        Hide
        Michael de Raadt added a comment -

        Thanks to everyone for the additional information.

        Show
        Michael de Raadt added a comment - Thanks to everyone for the additional information.
        Hide
        Rajesh Taneja added a comment -

        Hello. I will not be able to work on this issue in the immediate future. In order to create a truer sense of the state of this issue and to allow other developers to have chance to become involved, I am removing myself as the assignee of this issue.

        For more information, see http://docs.moodle.org/dev/Changes_to_issue_assignment

        If you have any information about this issue or a possible fix please post it here

        Show
        Rajesh Taneja added a comment - Hello. I will not be able to work on this issue in the immediate future. In order to create a truer sense of the state of this issue and to allow other developers to have chance to become involved, I am removing myself as the assignee of this issue. For more information, see http://docs.moodle.org/dev/Changes_to_issue_assignment If you have any information about this issue or a possible fix please post it here

          People

          • Votes:
            4 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

            • Created:
              Updated: