diff --git a/includes/database_mysqli.php b/includes/database_mysqli.php index 11f5f068..6846bb21 100644 --- a/includes/database_mysqli.php +++ b/includes/database_mysqli.php @@ -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) { diff --git a/modules/billing/module.php b/modules/billing/module.php index e41871aa..e10d8a60 100644 --- a/modules/billing/module.php +++ b/modules/billing/module.php @@ -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';" +); + ?> diff --git a/modules/gamemanager/ref_servermonitor.php b/modules/gamemanager/ref_servermonitor.php index 73b82b15..167c0b43 100644 --- a/modules/gamemanager/ref_servermonitor.php +++ b/modules/gamemanager/ref_servermonitor.php @@ -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');