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

Undefined variable: $httpsrequired in insert_image.php

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.9.5
    • Fix Version/s: None
    • Component/s: HTML Editor (TinyMCE)
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE

      Description

      lib/editor/htmlarea/popups/insert_image.php

      $httpsrequired does not decleared then $url is empty...

      We need to insert a statement pointed out 'add from here' - 'add to here'.

      ---------------------

      <?php // $Id: insert_image.php,v 1.9.8.2 2009/06/09 04:58:39 jonathanharker Exp $

      require("../../../../config.php");

      $id = optional_param('id', SITEID, PARAM_INT);
      // (Debug025): add from here!
      $httpsrequired = optional_param('httpsrequired', 0, PARAM_BOOL); //flag indicating editor on page with required https
      // (Debug025): add to here!

      require_login($id);
      require_capability('moodle/course:managefiles', get_context_instance(CONTEXT_COURSE, $id));

      @header('Content-Type: text/html; charset=utf-8');

      if ($httpsrequired or (!empty($_SERVER['HTTPS']) and $_SERVER['HTTPS'] != 'off'))

      { $url = preg_replace('|https?://[^/]+|', '', $CFG->wwwroot).'/lib/editor/htmlarea/'; }

      else

      { $url = $CFG->wwwroot.'/lib/editor/htmlarea/'; }

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              moodle.com moodle.com
              Reporter:
              shirai Tatsuya Shirai
              Participants:
              Component watchers:
              Andrew Nicols, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              4 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: