mirror of
https://github.com/processwire/processwire.git
synced 2025-08-27 00:25:05 +02:00
Additional updates for processwire/processwire-issues#1467
This commit is contained in:
@@ -167,8 +167,8 @@ class LazyCron extends WireData implements Module {
|
||||
}
|
||||
}
|
||||
|
||||
if(!$files->filePutContents($this->lockfile, time(), LOCK_EX)) {
|
||||
$this->error("Unable to write lock file: $this->lockfile", Notice::logOnly);
|
||||
if(!$files->filePutContents($this->lockfile, (string) time(), LOCK_EX)) {
|
||||
// $this->error("Unable to write lock file: $this->lockfile", Notice::logOnly);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -1216,7 +1216,7 @@ class ProcessPageLister extends Process implements ConfigurableModule {
|
||||
public function getSelectorTemplates($selector, $getArray = true) {
|
||||
$return = $getArray ? array() : '';
|
||||
$templates = array();
|
||||
if(stripos($selector, 'template=') === false) return $return;
|
||||
if(stripos("$selector", 'template=') === false) return $return;
|
||||
if(!preg_match('/(?:^|[^.])\btemplate=([^,]+)/i', $selector, $matches)) return $return;
|
||||
if(!$getArray) return $matches[1]; // return pipe separated string
|
||||
$template = explode('|', $matches[1]);
|
||||
|
Reference in New Issue
Block a user