From ee405d849b027618eec69425ed845afdc076b562 Mon Sep 17 00:00:00 2001 From: Florian Schaal <florian@schaal-24.de> Date: Wed, 06 May 2015 10:08:15 -0400 Subject: [PATCH] Prevent empty hostname during install --- interface/lib/classes/db_mysql.inc.php | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/interface/lib/classes/db_mysql.inc.php b/interface/lib/classes/db_mysql.inc.php index cbd9b1b..e4c8d31 100644 --- a/interface/lib/classes/db_mysql.inc.php +++ b/interface/lib/classes/db_mysql.inc.php @@ -128,8 +128,10 @@ $sTxt = $this->escape($sValue); $sTxt = str_replace('`', '', $sTxt); - if(strpos($sTxt, '.') !== false) $sTxt = preg_replace('/^(.+)\.(.+)$/', '`$1`.`$2`', $sTxt); - else $sTxt = '`' . $sTxt . '`'; + if(strpos($sTxt, '.') !== false) { + $sTxt = preg_replace('/^(.+)\.(.+)$/', '`$1`.`$2`', $sTxt); + $sTxt = str_replace('.`*`', '.*', $sTxt); + } else $sTxt = '`' . $sTxt . '`'; $sQuery = substr_replace($sQuery, $sTxt, $iPos2, 2); $iPos2 += strlen($sTxt); -- Gitblit v1.9.1