diff --git a/lib/midcom/db/attachment.php b/lib/midcom/db/attachment.php index 3d4a3f9be..885c85157 100644 --- a/lib/midcom/db/attachment.php +++ b/lib/midcom/db/attachment.php @@ -254,10 +254,15 @@ public function stat() return stat($path); } + public function __toString() : string + { + return $this->get_path(); + } + public function get_path() : string { if (!$this->id) { - return ''; + return $this->location; } return (new blob($this->__object))->get_path(); }