From 596fa3ff68e7e141987027e5b8f53f4e8bad681f Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Sun, 11 Feb 2024 21:03:13 +0700 Subject: [PATCH] Update demo_mode.php --- library/includes/cron/jobs/demo_mode.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/library/includes/cron/jobs/demo_mode.php b/library/includes/cron/jobs/demo_mode.php index 171139784..5db553887 100644 --- a/library/includes/cron/jobs/demo_mode.php +++ b/library/includes/cron/jobs/demo_mode.php @@ -11,12 +11,10 @@ if (!defined('BB_ROOT')) { die(basename(__FILE__)); } -ini_set('memory_limit', '-1'); set_time_limit(600); global $cron_runtime_log; -define('SELECTED_DB', DB()->selected_db); $dump_path = BB_ROOT . 'install/sql/mysql.sql'; if (!IN_DEMO_MODE || !is_file($dump_path) || !is_readable($dump_path)) { @@ -44,7 +42,7 @@ foreach ($sql_dump as $line) { $temp_line .= $line; if (str_ends_with(trim($line), ';')) { if (!DB()->query($temp_line)) { - $cron_runtime_log = 'Error performing query: ' . $temp_line; + $cron_runtime_log = 'Error performing query: ' . $temp_line . ' | ' . DB()->sql_error()['message']; } $temp_line = ''; }