mirror of
https://github.com/processwire/processwire.git
synced 2025-08-09 16:26:59 +02:00
Additional updates for processwire/processwire-issues#1467
This commit is contained in:
@@ -1561,7 +1561,7 @@ class WireDatabasePDO extends Wire implements WireDatabase {
|
||||
if($this->stripMB4 && is_string($str) && !empty($str)) {
|
||||
$str = $this->wire()->sanitizer->removeMB4($str);
|
||||
}
|
||||
return $this->pdoLast()->quote($str);
|
||||
return $this->pdoLast()->quote((string) $str);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -368,6 +368,7 @@ class WireInput extends Wire {
|
||||
$this->cookieVars = $this->wire(new WireInputDataCookie($_COOKIE, $this->lazy));
|
||||
$this->cookieVars->init();
|
||||
}
|
||||
$key = (string) $key;
|
||||
if(!strlen($key)) return $this->cookieVars;
|
||||
if($valid === null && $fallback === null && !strpos($key, '[]')) return $this->cookieVars->get($key);
|
||||
return $this->getValidInputValue($this->cookieVars, $key, $valid, $fallback);
|
||||
|
@@ -74,10 +74,10 @@ class InputfieldInteger extends Inputfield {
|
||||
}
|
||||
}
|
||||
|
||||
if(!strlen($attrs['value'])) {
|
||||
if(strlen($this->initValue)) {
|
||||
if(!strlen("$attrs[value]")) {
|
||||
if(strlen("$this->initValue")) {
|
||||
$attrs['value'] = (int) $this->initValue; // Inputfield-only version
|
||||
} else if(strlen($this->defaultValue)) {
|
||||
} else if(strlen("$this->defaultValue")) {
|
||||
$attrs['value'] = (int) $this->defaultValue; // Fieldtype version
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user