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

PHP Warning: Illegal string offset 'notificationpictureurl'

XMLWordPrintable

      In our CLI logs, we have many PHP warnings like this :

      PHP Notice:  Indirect modification of overloaded property core\message\message::$customdata has no effect in course/classes/task/content_notification_task.php on line 129
      PHP Warning:  Illegal string offset 'notificationpictureurl' in course/classes/task/content_notification_task.php on line 129
      

      We use PHP 7.4.

      In PHP 8.0, this warning seems to be a fatal error.

      If it can help, I paste the snippet used to reproduce issue :

      <?php
       
      define('CLI_SCRIPT', true);
       
      require 'config.php';
      $CFG->debug = 32767;
      $CFG->debugdisplay = 1;
       
      $eventdata = new \core\message\message();
      $eventdata->customdata = array('data1' => 1);
      $eventdata->customdata['data2'] = 2;
      

            pholden Paul Holden
            jboulen Julien Boulen
            Juan Leyva Juan Leyva
            Amaia Anabitarte Amaia Anabitarte
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 36 minutes
                1h 36m

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