mirror of
https://github.com/processwire/processwire.git
synced 2025-08-10 16:54:44 +02:00
Fix issue processwire/processwire-issues#2074
This commit is contained in:
@@ -519,7 +519,7 @@ abstract class Inputfield extends WireData implements Module {
|
||||
if($value === true) $value = self::collapsedYes;
|
||||
$value = (int) $value;
|
||||
|
||||
} else if(array_key_exists($key, $this->attributes)) {
|
||||
} else if(array_key_exists($key, $this->attributes) && $key !== 'required') {
|
||||
return $this->setAttribute($key, $value);
|
||||
|
||||
} else if($key === 'required' && $value && !is_object($value)) {
|
||||
@@ -950,7 +950,7 @@ abstract class Inputfield extends WireData implements Module {
|
||||
*/
|
||||
protected function ___callUnknown($method, $arguments) {
|
||||
$arg = isset($arguments[0]) ? $arguments[0] : null;
|
||||
if(isset($this->attributes[$method])) {
|
||||
if(isset($this->attributes[$method]) && $method !== 'required') {
|
||||
// get or set an attribute
|
||||
return $arg === null ? $this->getAttribute($method) : $this->setAttribute($method, $arg);
|
||||
} else if(($value = $this->getSetting($method)) !== null) {
|
||||
|
Reference in New Issue
Block a user