mirror of
https://github.com/processwire/processwire.git
synced 2025-08-16 19:54:24 +02:00
Fix issue processwire/processwire-issues#1738
This commit is contained in:
@@ -186,7 +186,7 @@ class PageComparison {
|
|||||||
* Given a Selectors object or a selector string, return whether this Page matches it
|
* Given a Selectors object or a selector string, return whether this Page matches it
|
||||||
*
|
*
|
||||||
* @param Page $page
|
* @param Page $page
|
||||||
* @param string|Selectors $s
|
* @param string|array|Selectors $s
|
||||||
* @return bool
|
* @return bool
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -220,7 +220,10 @@ class PageComparison {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else if($s instanceof Selectors) {
|
} else if($s instanceof Selectors) {
|
||||||
$selectors = $s;
|
$selectors = $s;
|
||||||
|
|
||||||
|
} else if(is_array($s)) {
|
||||||
|
$selectors = $page->wire(new Selectors($s));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// unknown data type to match
|
// unknown data type to match
|
||||||
@@ -397,4 +400,3 @@ class PageComparison {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user