From 002c2d15db238918dadf202fac3ccb23af26ef62 Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Fri, 1 Sep 2023 09:35:23 -0400 Subject: [PATCH] Additional updates for processwire/processwire-issues#1467 --- wire/core/InputfieldWrapper.php | 3 +-- wire/modules/LazyCron.module | 4 ++-- .../Process/ProcessPageLister/ProcessPageLister.module | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/wire/core/InputfieldWrapper.php b/wire/core/InputfieldWrapper.php index cc84c8f8..9bf7328b 100644 --- a/wire/core/InputfieldWrapper.php +++ b/wire/core/InputfieldWrapper.php @@ -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 } } - diff --git a/wire/modules/LazyCron.module b/wire/modules/LazyCron.module index 16f1c05e..366371c9 100644 --- a/wire/modules/LazyCron.module +++ b/wire/modules/LazyCron.module @@ -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; } diff --git a/wire/modules/Process/ProcessPageLister/ProcessPageLister.module b/wire/modules/Process/ProcessPageLister/ProcessPageLister.module index 2e4526d0..132a1b4e 100644 --- a/wire/modules/Process/ProcessPageLister/ProcessPageLister.module +++ b/wire/modules/Process/ProcessPageLister/ProcessPageLister.module @@ -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]);