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

PHP error from message block

    XMLWordPrintable

    Details

      Description

      In blocks/messages/block_messages.php, this line of code:

      $this->content->text = '';
      

      is throwing this error:

      PHP Warning:  Creating default object from empty value in blocks/messages/block_messages.php on line 34
      

      It was introduced as part of commit b58961ac. I am uncertain how to fix this, else I would provide a patch for it.

      To reproduce:

      • disable messaging
      • add messaging block on a page

        Attachments

          Activity

            People

            Assignee:
            c.d.smith Clem Smith
            Reporter:
            c.d.smith Clem Smith
            Peer reviewer:
            Simey Lameze
            Integrator:
            David Monllaó
            Tester:
            Jetha Chan
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              14/Sep/15