/** * Get the details of this file * * @access private */ protected function get_details() { parent::get_details(); if (!isset($this->id) or $this->id === null) { throw new Exception('Could not fetch file data: ID not set'); } $db = Database::Get(); $details = $db->get_row('SELECT * FROM picture WHERE file_id=?', [$this->id]); if ($details === null) { $this->save(); } else { $this->local_details = $details; } }