Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed error message variable #2955

Merged
merged 1 commit into from
Aug 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion www/runtest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3553,11 +3553,12 @@ function CheckRateLimit($test, &$error, &$errorTitle)
$cmrl = new RateLimiter($test['ip'], $monthly_limit);
$passesMonthly = $cmrl->check($total_runs);

$error = "<p>Don't worry! You can keep testing for free once you log in, which will give you access to other excellent features like:</p>";
$errorTemplate = "<p>Don't worry! You can keep testing for free once you log in, which will give you access to other excellent features like:</p>";
$errorTitleTemplate = "You've reached the limit for";

if (!$passesMonthly) {
$errorTitle = "{$errorTitleTemplate} this month";
$error = $errorTemplate;
$error .= <<<HTML
<script>
var intervalId = setInterval(function () {
Expand Down Expand Up @@ -3585,6 +3586,7 @@ function CheckRateLimit($test, &$error, &$errorTitle)
$count += $total_runs;
Cache::store($cache_key, $count, 1800);
} else {
$error = $errorTemplate;
$errorTitle = "{$errorTitleTemplate} this month";
$error .= <<<HTML
<script>
Expand Down
Loading