]> git.mjollnir.org Git - moodle.git/commitdiff
output MDL-21232 image now checks to see if passed url var is a moodle_url to avoid...
authorSam Hemelryk <sam@moodle.com>
Mon, 4 Jan 2010 02:53:47 +0000 (02:53 +0000)
committerSam Hemelryk <sam@moodle.com>
Mon, 4 Jan 2010 02:53:47 +0000 (02:53 +0000)
lib/outputrenderers.php

index 4e132f329f73d033f8f67f1d65a18a3f8169132a..7ce33f3ef572e355489a51889742b984364ce402 100644 (file)
@@ -1283,7 +1283,9 @@ class core_renderer extends renderer_base {
         if ($image_or_url instanceof html_image) {
             $image = clone($image_or_url);
         } else {
-            if (strpos($image_or_url, 'http')) {
+            if ($image_or_url instanceof moodle_url) {
+                $url = &$image_or_url;
+            } else if (strpos($image_or_url, 'http')) {
                 $url = new moodle_url($image_or_url);
             } else {
                 $url = $this->pix_url($image_or_url, 'moodle');