From 5836bac7a48524999961a1ec85c0bba165deb560 Mon Sep 17 00:00:00 2001 From: mjollnir_ Date: Mon, 13 Oct 2008 10:12:05 +0000 Subject: [PATCH] MDL-16587: portfolio/caller base class - be more defensive when asked to do things with files --- lib/portfolio/caller.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/portfolio/caller.php b/lib/portfolio/caller.php index cf945be907..86f0dd3b2e 100644 --- a/lib/portfolio/caller.php +++ b/lib/portfolio/caller.php @@ -293,6 +293,9 @@ abstract class portfolio_caller_base { * for single or multi file exports. */ public function prepare_package_file() { + if (empty($this->singlefile) && empty($this->multifiles)) { + throw new portfolio_caller_exception('invalidpreparepackagefile', 'portfolio', $this->get_return_url()); + } if ($this->singlefile) { return $this->exporter->copy_existing_file($this->singlefile); } -- 2.39.5