summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--application/controllers/Main.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/application/controllers/Main.php b/application/controllers/Main.php
index 3b5fe353e..9db63b39f 100644
--- a/application/controllers/Main.php
+++ b/application/controllers/Main.php
@@ -465,10 +465,11 @@ class Main extends MY_Controller {
if ($repaste_id) {
$filedata = $this->mfile->get_filedata($repaste_id);
-
- $pygments = new \libraries\Pygments($this->mfile->file($filedata["data_id"]), $filedata["mimetype"], $filedata["filename"]);
- if ($filedata !== false && $pygments->can_highlight()) {
- $this->data["textarea_content"] = file_get_contents($this->mfile->file($filedata["data_id"]));
+ if ($filedata !== false) {
+ $pygments = new \libraries\Pygments($this->mfile->file($filedata["data_id"]), $filedata["mimetype"], $filedata["filename"]);
+ if ($pygments->can_highlight()) {
+ $this->data["textarea_content"] = file_get_contents($this->mfile->file($filedata["data_id"]));
+ }
}
}