mirror of
https://github.com/processwire/processwire.git
synced 2025-08-15 03:05:26 +02:00
Updates for processwire/processwire-issues#1664
This commit is contained in:
@@ -722,7 +722,7 @@ class InputfieldCKEditor extends InputfieldTextarea implements ConfigModule {
|
||||
*/
|
||||
public function ___processInput(WireInputData $input) {
|
||||
|
||||
$value = trim($input[$this->name]);
|
||||
$value = trim((string) $input[$this->name]);
|
||||
if($value == self::PLACEHOLDER_TEXT) return $this; // ignore value
|
||||
|
||||
$value = $this->purifyValue($value);
|
||||
|
@@ -914,7 +914,7 @@ class InputfieldSelect extends Inputfield implements InputfieldHasSelectableOpti
|
||||
if(is_array($value)) {
|
||||
$cnt = count($value);
|
||||
if(!$cnt) return true;
|
||||
if($cnt === 1) return strlen(reset($value)) === 0;
|
||||
if($cnt === 1) return strlen((string) reset($value)) === 0;
|
||||
return false; // $cnt > 1
|
||||
|
||||
} else if($value === null || $value === false) {
|
||||
|
Reference in New Issue
Block a user