From d5146337de74d5d7887347ea325e87a2236d60bc Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Fri, 18 Sep 2020 14:30:03 -0400 Subject: [PATCH] Update Config class to auto-generate a tableSalt when one is not available from the static configuration --- wire/core/Config.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wire/core/Config.php b/wire/core/Config.php index 985316b0..f401f0df 100644 --- a/wire/core/Config.php +++ b/wire/core/Config.php @@ -205,7 +205,13 @@ class Config extends WireData { $value = parent::get($key); if($value === null) { // runtime properties - if($key === 'serverProtocol') $value = $this->serverProtocol(); + if($key === 'serverProtocol') { + $value = $this->serverProtocol(); + } else if($key === 'tableSalt') { + $value = parent::get('installed'); + if(!$value) $value = @filemtime($this->paths->assets . 'active.php'); + $this->data['tableSalt'] = $value; + } } return $value; }