1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-12 17:54:44 +02:00

Attempt fix for issue processwire/processwire-issues#724 where creating page from page reference field using UTF8 charset was failing.

This commit is contained in:
Ryan Cramer
2018-11-29 13:19:40 -05:00
parent 0cb693c450
commit e6213c23b3

View File

@@ -524,6 +524,10 @@ class PagesNames extends Wire {
$options = array_merge($defaults, $options);
$languages = $options['multilang'] || $options['language'] ? $this->wire('languages') : null;
if($languages && !$this->wire('modules')->isInstalled('LanguageSupportPageNames')) $languages = null;
if($this->wire('config')->pageNameCharset == 'UTF8') {
$name = $this->wire('sanitizer')->pageName($name, Sanitizer::toAscii);
}
$wheres = array();
$binds = array();