Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

API Removed user_error when setting missing option on UploadField via…

… setConfig. Added documentation to this function as a replacement for the check.
  • Loading branch information...
commit 96023079d5790db24f99ef0813e734e6add4fb4f 1 parent 59fb88b
@tractorcow tractorcow authored
Showing with 5 additions and 6 deletions.
  1. +5 −6 forms/UploadField.php
View
11 forms/UploadField.php
@@ -502,14 +502,13 @@ protected function customiseFile(File $file) {
/**
* Assign a front-end config variable for the upload field
*
+ * @see https://github.com/blueimp/jQuery-File-Upload/wiki/Options for the list of front end options available
+ *
* @param string $key
* @param mixed $val
* @return UploadField self reference
*/
public function setConfig($key, $val) {
- if(!array_key_exists($key, $this->ufConfig)) {
- user_error("UploadField->setConfig called with invalid option: '$key'", E_USER_ERROR);
- }
$this->ufConfig[$key] = $val;
return $this;
}
@@ -517,13 +516,13 @@ public function setConfig($key, $val) {
/**
* Gets a front-end config variable for the upload field
*
+ * @see https://github.com/blueimp/jQuery-File-Upload/wiki/Options for the list of front end options available
+ *
* @param string $key
* @return mixed
*/
public function getConfig($key) {
- if(!array_key_exists($key, $this->ufConfig)) {
- user_error("UploadField->getConfig called with invalid option: '$key'", E_USER_ERROR);
- }
+ if(!isset($this->ufConfig[$key])) return null;
return $this->ufConfig[$key];
}
Please sign in to comment.
Something went wrong with that request. Please try again.