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

PHP 8.1 Deprecation warnings when running tool_dataprivacy\task\process_data_request_task

XMLWordPrintable

    • MOODLE_401_STABLE
    • MOODLE_401_STABLE, MOODLE_402_STABLE
    • MDL-77983-401
    • MDL-77983-master
    • Hide

      Notes

      • All the tests must be done with PHP 8.1
      • The need to be performed with both MOODLE_401_STABLE and master.
      • DEBUG DEVELOPER and display errors should be enabled.

      Before the patch (without the changes applied). Reproduce the problem.
      Log in as admin user.
      Go to Site administration > Users > Privacy and policies > Data requests.
      Create a new data request for a user and approve the request. (Log in as this user so that there is a record in the sessions table for this user.)
      Now from the CLI run:

      php admin/cli/adhoc_task.php --execute='tool_dataprivacy\task\process_data_request_task'

      Verify that you see "PHP Deprecated:  base64_decode(): Passing null to parameter #1 ($string) of type string is deprecated" warnings.

       

      After the patch (with the changes). Confirm the fix.
      Log in as admin user.
      Go to Site administration > Users > Privacy and policies > Data requests.
      Create a new data request for a user and approve the request. (Log in as this user so that there is a record in the sessions table for this user.)
      Now from the CLI run:

      php admin/cli/adhoc_task.php --execute='tool_dataprivacy\task\process_data_request_task'

      Verify that you don't get any "PHP Deprecated" warnings any more.

      Show
      Notes All the tests must be done with PHP 8.1 The need to be performed with both MOODLE_401_STABLE and master. DEBUG DEVELOPER and display errors should be enabled. Before the patch (without the changes applied). Reproduce the problem. Log in as admin user. Go to Site administration > Users > Privacy and policies > Data requests. Create a new data request for a user and approve the request. (Log in as this user so that there is a record in the sessions table for this user.) Now from the CLI run: php admin/cli/adhoc_task.php --execute= 'tool_dataprivacy\task\process_data_request_task' Verify that you see "PHP Deprecated:  base64_decode(): Passing null to parameter #1 ($string) of type string is deprecated" warnings.   After the patch (with the changes). Confirm the fix. Log in as admin user. Go to Site administration > Users > Privacy and policies > Data requests. Create a new data request for a user and approve the request. (Log in as this user so that there is a record in the sessions table for this user.) Now from the CLI run: php admin/cli/adhoc_task.php --execute= 'tool_dataprivacy\task\process_data_request_task' Verify that you don't get any "PHP Deprecated" warnings any more.
    • 1
    • Team Hedgehog 2023 Sprint 2.0, Team Hedgehog 2023 Sprint 2.1

      On a Moodle 4.1 site on PHP8.1, running the task tool_dataprivacy\task\process_data_request_task produces PHP deprecation warnings.

       

      PHP Deprecated:  base64_decode(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/moodle/user/classes/privacy/provider.php on line 536

       

      To reproduce:

      Create a new data request for a user and approve the request.

      Run the tool_dataprivacy\task\process_data_request_task adhoc task from the cli.

      Look through the task output. You should get deprecation warnings for core_user.

            rjnl Rajneel Totaram
            rjnl Rajneel Totaram
            Huong Nguyen Huong Nguyen
            Andrew Lyons Andrew Lyons
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 21 minutes
                2h 21m

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