]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14591 - fixed a bug and a notice
authormjollnir_ <mjollnir_>
Wed, 13 Aug 2008 15:37:02 +0000 (15:37 +0000)
committermjollnir_ <mjollnir_>
Wed, 13 Aug 2008 15:37:02 +0000 (15:37 +0000)
lib/portfoliolib.php
portfolio/add.php

index e5df8d915c4003ecc1166034bdf6992c4e5a1a62..750278c70c28af7e906546f86db3ee643af83b7f 100644 (file)
@@ -2062,7 +2062,10 @@ final class portfolio_exporter {
             debugging(get_string($string, $module));
             return false;
         }
-        if (isset($this)) {
+        if (isset($this) && $this instanceof portfolio_exporter) {
+            // apparently even calling statically (with :: rather than ->
+            // causes $this to be set in some php versions
+            // (assuming this function is called from some other object - wtF?!)
             $this->process_stage_cleanup(true);
         }
         print_error($string, $module, $continue, $a);
index c2de922b7c8c0d88167ec00ad9a6540545c2f383..fb6607436b3304e641b1f18223ab2913a87041fc 100644 (file)
@@ -91,7 +91,6 @@ if ($dataid) {
 }
 
 if (!$exporter->get('instance')) {
-    print_object($exporter);
     // we've just arrived but have no instance
     // so retrieve everything from the request,
     // add them as hidden fields in a new form