Skip to content

Commit

Permalink
Merge pull request #2955 from WPO-Foundation/AZU174879_fix
Browse files Browse the repository at this point in the history
fixed error message variable
  • Loading branch information
mjkozicki authored Aug 1, 2023
2 parents 436daf8 + 6384d83 commit f9f6d3e
Showing 1 changed file with 3 additions and 1 deletion.
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

0 comments on commit f9f6d3e

Please sign in to comment.