1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-12 09:44:38 +02:00
This commit is contained in:
Ryan Cramer
2023-02-14 09:28:03 -05:00
parent ff1ba95e37
commit c3b9c72df9
3 changed files with 5 additions and 4 deletions

View File

@@ -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);
}
/**

View File

@@ -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);