mirror of
https://github.com/processwire/processwire.git
synced 2025-08-09 16:26:59 +02:00
Fix issue processwire/processwire-issues#1438
This commit is contained in:
@@ -783,9 +783,8 @@ class PageFinder extends Wire {
|
|||||||
public function ___find($selectors, array $options = array()) {
|
public function ___find($selectors, array $options = array()) {
|
||||||
|
|
||||||
if(is_string($selectors) || is_array($selectors)) {
|
if(is_string($selectors) || is_array($selectors)) {
|
||||||
$selectors = new Selectors();
|
list($s, $selectors) = array($selectors, $this->wire(new Selectors()));
|
||||||
$this->wire($selectors);
|
$selectors->init($s);
|
||||||
$selectors->init($selectors);
|
|
||||||
} else if(!$selectors instanceof Selectors) {
|
} else if(!$selectors instanceof Selectors) {
|
||||||
throw new PageFinderException("find() requires Selectors object, string or array");
|
throw new PageFinderException("find() requires Selectors object, string or array");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user