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

E_WARNING in core_webservice_get_site_info

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.7.10, 2.8.8, 2.9.2
    • Fix Version/s: 2.8.9, 2.9.3
    • Component/s: Web Services
    • Labels:
    • Testing Instructions:
      Hide

      Before this test you must ensure that PHP will log E_WARNINGs for Moodle.

      You will also want to create a web service token for a user on the Moodle Mobile web service in Site administration > Plugins > Web services > Manage tokens

      1. Execute the core_webservice_get_site_info via: <your moodle url>/webservice/rest/server.php?moodlewsrestformat=xml&wstoken=<web service token>&wsfunction=core_webservice_get_site_info
      2. Examine your PHP error log, you should not see a 'Creating default object from empty value' Warning for the rest web service page.
      Show
      Before this test you must ensure that PHP will log E_WARNINGs for Moodle. You will also want to create a web service token for a user on the Moodle Mobile web service in Site administration > Plugins > Web services > Manage tokens Execute the core_webservice_get_site_info via: <your moodle url> /webservice/rest/server.php?moodlewsrestformat=xml&wstoken= <web service token> &wsfunction=core_webservice_get_site_info Examine your PHP error log, you should not see a 'Creating default object from empty value' Warning for the rest web service page.
    • Affected Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE
    • Fixed Branches:
      MOODLE_28_STABLE, MOODLE_29_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      E_WARNING: Creating default object from empty value

      Stack trace
      in unknown called at /var/www/html/mod/assign/version.php (27)
      in include called at /var/www/html/webservice/externallib.php (142)
      in core_webservice_external::get_site_info called at ?
      in call_user_func_array called at /var/www/html/webservice/lib.php (1780)
      in webservice_base_server::execute called at /var/www/html/webservice/lib.php (1644)
      …webservice_base_server::run called at /var/www/html/webservice/rest/
      server.php (44)

      Reproducible steps

      Pre-requisites

      1. A user configured to use an external web service that includes core_webservice_get_site_info, for example Moodle Mobile sevices
      2. You have a web service token for the user.
      3. Moodle and PHP are set to log Warnings

      Steps

      1. Load the webservice via <your moodle url>/webservice/rest/server.php?moodlewsrestformat=xml&wstoken=<web service token>&wsfunction=core_webservice_get_site_info
      2. Examine your PHP error log
      3. You should see an warning about Creating default object from empty value

        Attachments

          Activity

            People

            • Assignee:
              nmagill Neill Magill
              Reporter:
              nmagill Neill Magill
              Peer reviewer:
              Ryan Wyllie
              Integrator:
              Dan Poltawski
              Tester:
              Dan Poltawski
              Participants:
              Component watchers:
              Juan Leyva, Jake Dallimore, Jun Pataleta, Ryan Wyllie
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                9/Nov/15