diff --git a/framework/captcha/Captcha.php b/framework/captcha/Captcha.php index 3f3bffb..b85843f 100644 --- a/framework/captcha/Captcha.php +++ b/framework/captcha/Captcha.php @@ -107,9 +107,9 @@ class Captcha extends InputWidget $input = $this->renderInputHtml('text'); $route = $this->captchaAction; if (is_array($route)) { - $route['v'] = uniqid(); + $route['v'] = uniqid('', true); } else { - $route = [$route, 'v' => uniqid()]; + $route = [$route, 'v' => uniqid('', true)]; } $image = Html::img($route, $this->imageOptions); echo strtr($this->template, [ diff --git a/framework/captcha/CaptchaAction.php b/framework/captcha/CaptchaAction.php index b7a7c95..a1aebb8 100644 --- a/framework/captcha/CaptchaAction.php +++ b/framework/captcha/CaptchaAction.php @@ -132,7 +132,7 @@ class CaptchaAction extends Action 'hash2' => $this->generateValidationHash(strtolower($code)), // we add a random 'v' parameter so that FireFox can refresh the image // when src attribute of image tag is changed - 'url' => Url::to([$this->id, 'v' => uniqid()]), + 'url' => Url::to([$this->id, 'v' => uniqid('', true)]), ]; } diff --git a/framework/console/controllers/AssetController.php b/framework/console/controllers/AssetController.php index 9d88d9f..187cdfd 100644 --- a/framework/console/controllers/AssetController.php +++ b/framework/console/controllers/AssetController.php @@ -484,7 +484,7 @@ class AssetController extends Controller } } $array = VarDumper::export($array); - $version = date('Y-m-d H:i:s', time()); + $version = date('Y-m-d H:i:s'); $bundleFileContent = <<
- +
endBody() // to allow injecting code into body (mostly by Yii Debug Toolbar)?> diff --git a/framework/web/MultipartFormDataParser.php b/framework/web/MultipartFormDataParser.php index 89ebf0a..1dc6b31 100644 --- a/framework/web/MultipartFormDataParser.php +++ b/framework/web/MultipartFormDataParser.php @@ -219,7 +219,7 @@ class MultipartFormDataParser extends BaseObject implements RequestParserInterfa $headers = []; $headerParts = preg_split('/\\R/s', $headerContent, -1, PREG_SPLIT_NO_EMPTY); foreach ($headerParts as $headerPart) { - if (($separatorPos = strpos($headerPart, ':')) === false) { + if (strpos($headerPart, ':') === false) { continue; }