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

Repository - Dropbox - Undeclared variables

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • 2.0
    • Repositories
    • None
    • MOODLE_20_STABLE

      Dongsheng - I am using moodle.jesuitscholar.com as a test server and tried to setup Dropbox repository when navigating to select a file, I receive a message about an invalid JSON string:

      Notice: Undefined property: stdClass::$path in /home1/jesuits1/public_html/moodle/repository/dropbox/lib.php on line 134

      Notice: Undefined property: stdClass::$contents in /home1/jesuits1/public_html/moodle/repository/dropbox/lib.php on line 163

      Warning: Invalid argument supplied for foreach() in /home1/jesuits1/public_html/moodle/repository/dropbox/lib.php on line 164
      {"list":[],"path":[

      {"name":"Dropbox Sandbox","path":"\/"}

      ],"manage":false,"dynload":true,"nosearch":true,"repo_id":5}

      I took a quick look and the logic about testing for whether $result->path is set seems like it could use a little attention. It seems to be used without being checked for on line 134, then it is checked for being empty and sets a current path. It looks like a general review of the get_listing function could be helpful in cleaning up some whitespacing issues as well.

      I'm hoping I have everything entered for this to work. I did enter the Dropbox API key on the Moodle end.

      Peace - Anthony

            dongsheng Dongsheng Cai
            aborrow Anthony Borrow
            Nobody Nobody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

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