1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-08 07:47:00 +02:00
This commit is contained in:
Ryan Cramer
2023-09-01 09:35:23 -04:00
parent fbf2f140a7
commit 002c2d15db
3 changed files with 4 additions and 5 deletions

View File

@@ -863,7 +863,7 @@ class InputfieldWrapper extends Inputfield implements \Countable, \IteratorAggre
// wrap the inputfield output
$attrs = '';
$label = $inputfield->getSetting('label');
$label = (string) $inputfield->getSetting('label');
$skipLabel = $inputfield->getSetting('skipLabel');
$skipLabel = is_bool($skipLabel) || empty($skipLabel) ? (bool) $skipLabel : (int) $skipLabel; // force as bool or int
if(!strlen($label) && $skipLabel !== Inputfield::skipLabelBlank && $inputfield->className() != 'InputfieldWrapper') {
@@ -1954,4 +1954,3 @@ class InputfieldWrapper extends Inputfield implements \Countable, \IteratorAggre
}
}

View File

@@ -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;
}

View File

@@ -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]);