From f812bbe834b4644ad82f02b20d417812a0ca1be6 Mon Sep 17 00:00:00 2001 From: mjollnir_ Date: Wed, 13 Aug 2008 15:37:02 +0000 Subject: [PATCH] MDL-14591 - fixed a bug and a notice --- lib/portfoliolib.php | 5 ++++- portfolio/add.php | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/portfoliolib.php b/lib/portfoliolib.php index e5df8d915c..750278c70c 100644 --- a/lib/portfoliolib.php +++ b/lib/portfoliolib.php @@ -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); diff --git a/portfolio/add.php b/portfolio/add.php index c2de922b7c..fb6607436b 100644 --- a/portfolio/add.php +++ b/portfolio/add.php @@ -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 -- 2.39.5