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

Loading an unknown customfield handler produced a PHP type error

    XMLWordPrintable

Details

    Description

      Found while looking at MDL-77532

      If the customfield handler isn't present, then we receive an obscure PHP type error:

      Fatal error: Uncaught TypeError: stripos(): Argument #1 ($haystack) must be of type string, stdClass given in /opt/moodle/master/src/lib/setuplib.php:580 Stack trace: #0 /opt/moodle/master/src/lib/setuplib.php(580): stripos() #1 /opt/moodle/master/src/lib/setuplib.php(363): get_exception_info() #2 [internal function]: default_exception_handler() #3 {main} thrown in /opt/moodle/master/src/lib/setuplib.php on line 580
      

      Instead of the intended exception (once fixed):

      Because the arguments passed to the exception constructor are misordered

      Attachments

        Issue Links

          Activity

            People

              pholden Paul Holden
              pholden Paul Holden
              David Carrillo David Carrillo
              Jun Pataleta Jun Pataleta
              CiBoT CiBoT
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 35 minutes
                  35m

                  Clockify

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