3 if (!defined('GNUSOCIAL')) { exit(1); }
6 * Parent class for an exception when a POST upload does not contain a file.
10 * @author Mikael Nordfeldth <mmn@hethane.se>
11 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3
12 * @link http://gnu.io/
15 class NoUploadedMediaException extends ClientException
17 public $fieldname = null;
19 public function __construct($fieldname, $msg=null)
21 $this->fieldname = $fieldname;
24 // TRANS: Exception text shown when no uploaded media was provided in POST
25 // TRANS: %s is the HTML input field name.
26 $msg = sprintf(_('There is no uploaded media for input field "%s".'), $this->fieldname);
29 parent::__construct($msg, 400);