1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-13 18:24:57 +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

@@ -525,6 +525,10 @@ class PagesNames extends Wire {
$languages = $options['multilang'] || $options['language'] ? $this->wire('languages') : null; $languages = $options['multilang'] || $options['language'] ? $this->wire('languages') : null;
if($languages && !$this->wire('modules')->isInstalled('LanguageSupportPageNames')) $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(); $wheres = array();
$binds = array(); $binds = array();
$parentID = $options['parent'] === null ? null : (int) "$options[parent]"; $parentID = $options['parent'] === null ? null : (int) "$options[parent]";