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

lib/classes/notification.php default object from empty value PHP warning

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1, 3.2
    • Fix Version/s: 3.1.5, 3.2.2
    • Component/s: General
    • Labels:
    • Testing Instructions:
      Hide
      1. Open your terminal and tail your web server's error log file.
        • e.g. if using Apache on Linux:

          tail -f /var/log/apache2/error.log
          

      2. Set the $CFG->wwwroot to "http://localhost/[your_moodle_site]".
      3. Login as an admin to your moodle site.
      4. Now change set the value of $CFG->wwwroot to "http://[SERVER_IP_ADDRESS]/[your_moodle_site]".
      5. Purge the caches so that the site will reload using the new value of the server URL.
      6. Check the error log feed on the terminal.
        • Confirm that you don't see the PHP warning message.
      7. Set again the $CFG->wwwroot to "http://localhost/[your_moodle_site]".
      8. Purge the caches so that the site will reload using the new value of the server URL.
      9. Check the error log feed on the terminal.
        • Confirm that you don't see the PHP warning message.
      Show
      Open your terminal and tail your web server's error log file. e.g. if using Apache on Linux: tail -f /var/log/apache2/error.log Set the $CFG->wwwroot to " http://localhost/[your_moodle_site ] ". Login as an admin to your moodle site. Now change set the value of $CFG->wwwroot to " http://[SERVER_IP_ADDRESS]/[your_moodle_site ] ". Purge the caches so that the site will reload using the new value of the server URL. Check the error log feed on the terminal. Confirm that you don't see the PHP warning message. Set again the $CFG->wwwroot to " http://localhost/[your_moodle_site ] ". Purge the caches so that the site will reload using the new value of the server URL. Check the error log feed on the terminal. Confirm that you don't see the PHP warning message.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE
    • Pull Master Branch:
      MDL-56679-master

      Description

      Seen in both mine and Andrews logs recently:

      PHP Warning:  Creating default object from empty value in /Users/danp/moodles/im/moodle/lib/classes/notification.php on line 85
      PHP Warning:  Creating default object from empty value in /Users/danp/moodles/pm/moodle/lib/classes/notification.php on line 85
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              poltawski Dan Poltawski
              Peer reviewer:
              Jun Pataleta
              Integrator:
              David Monllaó
              Tester:
              David Mudrák (@mudrd8mz)
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                13/Mar/17