← Back to team overview

mahara-contributors team mailing list archive

[Bug 1427027] [NEW] EmbeddedImage::prepare_embedded_images() - Undefined variable: form

 

Public bug reported:

Mahara:  15.04dev
OS: Linux
DB: postgres, mysql
browser: any

The function EmbeddedImage::prepare_embedded_images() in
htdocs/lib/embeddedimage.php has 2 undefined variables:

$form and $element

on line 61.

[WAR] 62 (lib/embeddedimage.php:61) Undefined variable: form
Call stack (most recent first):

    log_message("Undefined variable: form", 8, true, true, "/var/www/maharacode/mahara/htdocs/lib/embeddedimag...", 61) at /var/www/maharacode/mahara/htdocs/lib/errors.php:441
    error(8, "Undefined variable: form", "/var/www/maharacode/mahara/htdocs/lib/embeddedimag...", 61, array(size 20)) at /var/www/maharacode/mahara/htdocs/lib/embeddedimage.php:61
    EmbeddedImage::prepare_embedded_images("<p>aaaa&nbsp;<img src="http://d.general.mahara/art...";, "post", 2, "1") at /var/www/maharacode/mahara/htdocs/interaction/forum/editpost.php:198
    editpost_submit(object(Pieform), array(size 7)) at Unknown:0
    call_user_func_array("editpost_submit", array(size 2)) at /var/www/maharacode/mahara/htdocs/lib/pieforms/pieform.php:532
    Pieform->__construct(array(size 4)) at /var/www/maharacode/mahara/htdocs/lib/pieforms/pieform.php:162
    Pieform::process(array(size 4)) at /var/www/maharacode/mahara/htdocs/lib/pieforms/pieform.php:71
    pieform(array(size 4)) at /var/www/maharacode/mahara/htdocs/interaction/forum/editpost.php:173


It can be reproduced by:

- Create a group and enter a new topic in the forum.
- As a regular user - not the owner of the group - create a reply (with an image) to the topic
- As the owner of the group, edit the reply.
- above error will be generated.

** Affects: mahara
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1427027

Title:
  EmbeddedImage::prepare_embedded_images() - Undefined variable: form

Status in Mahara ePortfolio:
  New

Bug description:
  Mahara:  15.04dev
  OS: Linux
  DB: postgres, mysql
  browser: any

  The function EmbeddedImage::prepare_embedded_images() in
  htdocs/lib/embeddedimage.php has 2 undefined variables:

  $form and $element

  on line 61.

  [WAR] 62 (lib/embeddedimage.php:61) Undefined variable: form
  Call stack (most recent first):

      log_message("Undefined variable: form", 8, true, true, "/var/www/maharacode/mahara/htdocs/lib/embeddedimag...", 61) at /var/www/maharacode/mahara/htdocs/lib/errors.php:441
      error(8, "Undefined variable: form", "/var/www/maharacode/mahara/htdocs/lib/embeddedimag...", 61, array(size 20)) at /var/www/maharacode/mahara/htdocs/lib/embeddedimage.php:61
      EmbeddedImage::prepare_embedded_images("<p>aaaa&nbsp;<img src="http://d.general.mahara/art...";, "post", 2, "1") at /var/www/maharacode/mahara/htdocs/interaction/forum/editpost.php:198
      editpost_submit(object(Pieform), array(size 7)) at Unknown:0
      call_user_func_array("editpost_submit", array(size 2)) at /var/www/maharacode/mahara/htdocs/lib/pieforms/pieform.php:532
      Pieform->__construct(array(size 4)) at /var/www/maharacode/mahara/htdocs/lib/pieforms/pieform.php:162
      Pieform::process(array(size 4)) at /var/www/maharacode/mahara/htdocs/lib/pieforms/pieform.php:71
      pieform(array(size 4)) at /var/www/maharacode/mahara/htdocs/interaction/forum/editpost.php:173

  
  It can be reproduced by:

  - Create a group and enter a new topic in the forum.
  - As a regular user - not the owner of the group - create a reply (with an image) to the topic
  - As the owner of the group, edit the reply.
  - above error will be generated.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1427027/+subscriptions


Follow ups

References