Moodle
  1. Moodle
  2. MDL-10196

Mnet : XMLRPC code and text errors are not ever logged

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8, 1.8.1
    • Fix Version/s: 1.8.4, 1.9, 2.0
    • Component/s: MNet
    • Labels:
      None
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE

      Description

      Function mnet_server_fault_xml of mnet/xmlrpc/server.php does not ever log the code and the text of the error.
      Therefore it can be very hard to debug...

      It's because mnet_server_prepare_response sometimes does nothing (if the request is not signed or not encrypted...).

      Here is a very simple fix:

      Index: server.php
      ===================================================================
      RCS file: /cvsroot/moodle/moodle/mnet/xmlrpc/server.php,v
      retrieving revision 1.10.2.1
      diff -u -r1.10.2.1 server.php
      — server.php 20 Feb 2007 02:05:31 -0000 1.10.2.1
      +++ server.php 20 Jun 2007 12:00:45 -0000
      @@ -277,7 +277,7 @@
      </methodResponse>');

      if (!empty($CFG->mnet_rpcdebug))

      { - trigger_error("XMLRPC Error Response"); + trigger_error("XMLRPC Error Response $code $text"); trigger_error(print_r($return,1)); }

        Gliffy Diagrams

          Activity

          Hide
          Donal McMullan added a comment -

          Done - thanks Arnaud.

          Show
          Donal McMullan added a comment - Done - thanks Arnaud.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: