1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-12 17:54:44 +02:00

Update Config class to auto-generate a tableSalt when one is not available from the static configuration

This commit is contained in:
Ryan Cramer
2020-09-18 14:30:03 -04:00
parent 8eee7a509f
commit d5146337de

View File

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