Commits

Wez Furlong  committed c7918d1

don't allow empty snippets

  • Participants
  • Parent commits e977918

Comments (0)

Files changed (1)

File inc/snippet.php

   {
     $this->updated = $CS->cid;
 
+    if (!strlen(trim($this->snippet))) {
+      throw new Exception("Snippet cannot be empty");
+    }
+
     if ($this->snid === null) {
       $this->created = $CS->cid;