Fix current_version var in cron.php when telemetry is configured this was caused by the cron not know what its working directory was added change to current working directory

This commit is contained in:
johnnyq 2023-09-27 12:15:12 -04:00
parent f658fe0c6c
commit f914fbb96f
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,8 @@
<?php
// Set working directory to the directory this cron script lives at.
chdir(dirname(__FILE__));
require_once("config.php");
require_once("functions.php");

View File

@ -66,7 +66,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
} else {
$product_description_display = "<div style='white-space:pre-line'>$product_description</div>";
}
$product_price = number_format(floatval($row['product_price']),2);
$product_price = floatval($row['product_price']);
$product_currency_code = nullable_htmlentities($row['product_currency_code']);
$product_created_at = nullable_htmlentities($row['product_created_at']);
$category_id = intval($row['category_id']);