From: Alan Knowles Date: Mon, 2 Dec 2019 06:58:51 +0000 (+0800) Subject: UpdateDatabase/MysqlEngineCharset.php X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=382e626aef68914367ce69c5173ce34a6b347c0e UpdateDatabase/MysqlEngineCharset.php --- diff --git a/UpdateDatabase/MysqlEngineCharset.php b/UpdateDatabase/MysqlEngineCharset.php index 374e6d7b..a1791876 100644 --- a/UpdateDatabase/MysqlEngineCharset.php +++ b/UpdateDatabase/MysqlEngineCharset.php @@ -13,8 +13,14 @@ class Pman_Core_UpdateDatabase_MysqlEngineCharset { function __construct() { - - $this->loadIniFiles(); //?? shared??? + // this might get run before we have imported the database + // and hence not have any db. + try { + $this->loadIniFiles(); //?? shared??? + } catch(PDO_DataObject_Exception_InvalidConfig $e) { + echo "SKipping MysqlEngineCharse - no database yet\n"; + return; + } $dbo = DB_DataObject::factory('core_enum'); if (is_a($dbo, 'PDO_DataObject')) {