Moodle
  1. Moodle
  2. MDL-26450

use of undefined $scorm->pkgtype in function scorm_parse($scorm)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.10
    • Fix Version/s: 1.9.12
    • Component/s: SCORM
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE
    • Rank:
      16163

      Description

      Notice: Undefined property: stdClass::$pkgtype in /Users/skodak/server/workspace/integration19/mod/scorm/locallib.php on line 772
      Call Stack: 0.0003 692808 1.

      {main}

      ()
      /Users/skodak/server/workspace/integration19/mod/scorm/view.php:0 0.1017 23022968 2. scorm_simple_play()
      /Users/skodak/server/workspace/integration19/mod/scorm/view.php:50 0.1017 23023016 3. scorm_parse()
      /Users/skodak/server/workspace/integration19/mod/scorm/locallib.php:733

      This happens when you set Auto update option to "every time it is used" and visit the view.php, the reason is that the

      if (($packagedata = scorm_check_package($scorm)) != null) {
      $scorm->pkgtype = $packagedata->pkgtype;

      is not in the mod/scorm/view.php

        Activity

        Hide
        Dan Marsden added a comment -

        Pull request submitted - this only affects 1.9 stable as we have re-factored the code in 2.0 and there's little point in backporting the re-factor but it makes sense to fix the php error. - thanks for the report.

        Show
        Dan Marsden added a comment - Pull request submitted - this only affects 1.9 stable as we have re-factored the code in 2.0 and there's little point in backporting the re-factor but it makes sense to fix the php error. - thanks for the report.
        Hide
        David Mudrak added a comment -

        Tested. No PHP notice displayed. Closing. Thanks for the fix Dan.

        Show
        David Mudrak added a comment - Tested. No PHP notice displayed. Closing. Thanks for the fix Dan.

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: