Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / views / src / Plugin / views / filter / Date.php
index dbb573fcd497047da099b9d35ea314e95826f166..92e77dff7cd6ccbe0a34b1124f706c5d9a5d2baf 100644 (file)
@@ -166,8 +166,10 @@ class Date extends NumericFilter {
     $b = intval(strtotime($this->value['max'], 0));
 
     if ($this->value['type'] == 'offset') {
-      $a = '***CURRENT_TIME***' . sprintf('%+d', $a); // keep sign
-      $b = '***CURRENT_TIME***' . sprintf('%+d', $b); // keep sign
+      // Keep sign.
+      $a = '***CURRENT_TIME***' . sprintf('%+d', $a);
+      // Keep sign.
+      $b = '***CURRENT_TIME***' . sprintf('%+d', $b);
     }
     // This is safe because we are manually scrubbing the values.
     // It is necessary to do it this way because $a and $b are formulas when using an offset.
@@ -178,7 +180,8 @@ class Date extends NumericFilter {
   protected function opSimple($field) {
     $value = intval(strtotime($this->value['value'], 0));
     if (!empty($this->value['type']) && $this->value['type'] == 'offset') {
-      $value = '***CURRENT_TIME***' . sprintf('%+d', $value); // keep sign
+      // Keep sign.
+      $value = '***CURRENT_TIME***' . sprintf('%+d', $value);
     }
     // This is safe because we are manually scrubbing the value.
     // It is necessary to do it this way because $value is a formula when using an offset.