mirror of
https://github.com/processwire/processwire.git
synced 2025-08-08 15:57:01 +02:00
Fix issue processwire/processwire-issues#1804
This commit is contained in:
@@ -650,13 +650,14 @@ class PageTraversal {
|
||||
$options['pageNum'] = $input->pageNum();
|
||||
}
|
||||
|
||||
if(count($options['urlSegments'])) {
|
||||
if(is_array($options['urlSegments']) && count($options['urlSegments'])) {
|
||||
$str = '';
|
||||
if(is_string($options['urlSegments'][0])) {
|
||||
reset($options['urlSegments']);
|
||||
if(is_string(key($options['urlSegments']))) {
|
||||
// associative array converts to key/value style URL segments
|
||||
foreach($options['urlSegments'] as $key => $value) {
|
||||
$str .= "$key/$value/";
|
||||
if(is_int($key)) $str = '';
|
||||
if(is_int($key)) $str = ''; // abort assoc array option if any int key found
|
||||
if($str === '') break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user