fix wrapper->fmt calls
[mdref/mdref] / mdref / File.php
index 3c1ca0a6d276e37314178606f336d595ad3137c2..0ca2bd848d4f761da288ee6900187ca649411e2e 100644 (file)
@@ -50,7 +50,7 @@ class File {
         * @return string
         * @throws Exception
         */
-       public function readDescription() : ?string {
+       public function readDescription() : string {
                if (!$this->rewind()) {
                        throw Exception::fromLastError();
                }
@@ -58,7 +58,7 @@ class File {
                && (false !== fgets($this->fd))) {
                        return fgets($this->fd);
                }
-               return null;
+               return "";
        }
 
        /**
@@ -67,7 +67,7 @@ class File {
         * @return string
         * @throws Exception
         */
-       public function readFullDescription() : ?string {
+       public function readFullDescription() : string {
                $desc = $this->readDescription();
                while (false !== ($line = fgets($this->fd))) {
                        if ($line[0] === "#") {