mirror of
https://github.com/processwire/processwire.git
synced 2025-08-10 00:37:02 +02:00
Additional updates for processwire/processwire-issues#1467
This commit is contained in:
@@ -41,6 +41,7 @@ class FilenameArray implements \IteratorAggregate, \Countable {
|
||||
*
|
||||
*/
|
||||
protected function getKey($filename) {
|
||||
$filename = (string) $filename;
|
||||
$pos = strpos($filename, '?');
|
||||
$key = $pos ? substr($filename, 0, $pos) : $filename;
|
||||
return md5($key);
|
||||
|
@@ -1831,6 +1831,8 @@ abstract class Inputfield extends WireData implements Module {
|
||||
/** @var Sanitizer $sanitizer */
|
||||
$sanitizer = $this->wire('sanitizer');
|
||||
|
||||
$str = (string) $str;
|
||||
|
||||
// if already encoded, then un-encode it
|
||||
if(strpos($str, '&') !== false && preg_match('/&(#\d+|[a-zA-Z]+);/', $str)) {
|
||||
$str = $sanitizer->unentities($str);
|
||||
|
@@ -2788,7 +2788,7 @@ class PageFinder extends Wire {
|
||||
|
||||
} else if(in_array($field, array('created', 'modified', 'published'))) {
|
||||
// prepare value for created, modified or published date fields
|
||||
if(!ctype_digit($value)) {
|
||||
if(!ctype_digit("$value")) {
|
||||
$value = $datetime->strtotime($value);
|
||||
}
|
||||
if(empty($value)) {
|
||||
|
Reference in New Issue
Block a user