Skip to content

Commit

Permalink
Merge pull request #225 from Rosenstein/patch-2
Browse files Browse the repository at this point in the history
[fix] ob_flush() error in LGSL7
  • Loading branch information
tltneon authored Sep 11, 2024
2 parents 208ec70 + 16e0679 commit 2804900
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lgsl_cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
$db_query = "SELECT `type`,`ip`,`c_port`,`q_port`,`s_port` FROM `{$lgsl_config['db']['prefix']}{$lgsl_config['db']['table']}` WHERE `disabled`= 0 ORDER BY `cache_time` ASC;";
$db_result = $db->query($db_query);

if (ob_get_level() == 0) ob_start();
foreach ($db_result as $db_row) {
echo str_pad(LGSL::timer("taken"), 8, " ").":".
str_pad($db_row['type'], 15, " ").":".
Expand All @@ -35,8 +36,9 @@
$server = new Server(["type" => $db_row['type'], "ip" => $db_row['ip'], "c_port" => $db_row['c_port'], "q_port" => $db_row['q_port']]);
$server->queryCached($request);

flush();
ob_flush();
flush();
}
ob_end_flush();

echo "\r\nFINISHED</pre>";

0 comments on commit 2804900

Please sign in to comment.