Fix captcha issue for csv forms static control, a=chris
Fix captcha issue for csv forms static control, a=chris
diff --git a/src/controllers/StaticController.php b/src/controllers/StaticController.php
index 2f17e1cc8..77594ef69 100644
--- a/src/controllers/StaticController.php
+++ b/src/controllers/StaticController.php
@@ -148,6 +148,9 @@ class StaticController extends Controller
EOD;
}
}
+ if (strpos($page_string, "[{image-captcha}]") !== false) {
+ $this->setupGraphicalCaptchaViewData($data);
+ }
if (strpos($page_string, "spreadsheet_data") !== false) {
if (!in_array("spreadsheet", $data["INCLUDE_SCRIPTS"])) {
$data["INCLUDE_SCRIPTS"][] = "spreadsheet";
diff --git a/src/models/CronModel.php b/src/models/CronModel.php
index d20d1e51e..4df6a2c51 100644
--- a/src/models/CronModel.php
+++ b/src/models/CronModel.php
@@ -113,6 +113,9 @@ class CronModel extends Model
if ($this->cron_table === null) {
$this->loadCronTable();
}
+ if (!is_array($this->cron_table)) {
+ $this->cron_table = [];
+ }
$this->cron_table[$key] = ($time === false) ? time() : $time;
if (!$transaction) {
file_put_contents($this->cron_file, serialize($this->cron_table));