Merge pull request #77 from GameServerPanel/copilot/fix-new-batch-errors

This commit is contained in:
Frank Harris 2026-05-01 06:17:20 -07:00 committed by GitHub
commit 674fd1ce21
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 2 deletions

View file

@ -73,7 +73,8 @@ class OGPDatabaseMySQL extends OGPDatabase
}
public function realEscapeSingle($string){
return mysqli_real_escape_string($this->link, $string);
if ($string === null) return '';
return mysqli_real_escape_string($this->link, (string)$string);
}
private function listQuery($query) {

View file

@ -25,7 +25,7 @@
// Module general information
$module_title = "billing";
$module_version = "3.0";
$db_version = 1;
$db_version = 2;
$module_required = FALSE;
// Module description
$module_description = "Billing storefront / provisioning integration. Public ordering runs as a standalone site; panel pages provide provisioning and admin order management.";
@ -125,4 +125,11 @@ $install_queries[0] = array(
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;"
);
// Version 2: Add created_by_admin column to billing_orders for existing installs
$install_queries[1] = array(
"ALTER TABLE `".OGP_DB_PREFIX."billing_orders`
ADD COLUMN IF NOT EXISTS `created_by_admin` TINYINT(1) NOT NULL DEFAULT 0
COMMENT 'Set to 1 when an admin manually created this server via the panel';"
);
?>

View file

@ -67,6 +67,7 @@ function exec_ogp_module()
$query_name = $mod; // If query name does not exist use mod key instead.
// Check if the screen running the server is running.
$map = '';
if ($server_xml->protocol == "gameq")
{
require('protocol/GameQ/functions.php');