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

get_name() should use get_called_class() instead of __CLASS__

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.6
    • 2.6
    • Events API
    • BACKEND Sprint 3

      If a event doesn't implement get_name() method, the name of the event defaults to "core: base" always, instead of expected "frankenstyle: class_name", since _CLASS_ always returns the class it is called in.
      http://www.php.net/manual/en/language.constants.predefined.php#44214

      We can use get_called_class() instead.

            ankit_frenz Ankit Agarwal
            ankit_frenz Ankit Agarwal
            Mark Nelson Mark Nelson
            Sam Hemelryk Sam Hemelryk
            Petr Skoda Petr Skoda
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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