]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-15934 - fix small bug in cleanup
authormjollnir_ <mjollnir_>
Tue, 5 Aug 2008 13:30:53 +0000 (13:30 +0000)
committermjollnir_ <mjollnir_>
Tue, 5 Aug 2008 13:30:53 +0000 (13:30 +0000)
lib/portfoliolib.php

index ec78324759b71b88d57274f3f1c86ce89e2ac915..8495ea7cd776d650489db943c42f8aa9e64f4225 100644 (file)
@@ -1965,7 +1965,9 @@ final class portfolio_exporter {
         require_once($CFG->dirroot . '/backup/lib.php');
         delete_dir_contents($this->tempdir);
         // @todo maybe add a hook in the plugin(s)
-        $DB->delete_records('portfolio_tempdata', array('id' => $this->tempdataid));
+        if ($this->caller->get('tempdataid')) {
+            $DB->delete_records('portfolio_tempdata', array('id' => $this->caller->get('tempdataid')));
+        }
 
         return true;
     }