mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
♻️ N°4325 refactor CMDBSource mysqli attributes to a separate wrapper class (#237)
In 2.7.5 with N°3513 we added a second mysqli attribute in CMDBSource, so that we can test transactions (see TransactionsTest). But this wasn't documented, and was really causing confusion ! This refactor wraps both attributes in a dedicated object so that the logic is clearer.
This commit is contained in:
@@ -8,22 +8,6 @@ if (!(PHP_VERSION_ID >= 70103)) {
|
||||
$issues[] = 'Your Composer dependencies require a PHP version ">= 7.1.3". You are running ' . PHP_VERSION . '.';
|
||||
}
|
||||
|
||||
$missingExtensions = array();
|
||||
extension_loaded('ctype') || $missingExtensions[] = 'ctype';
|
||||
extension_loaded('dom') || $missingExtensions[] = 'dom';
|
||||
extension_loaded('gd') || $missingExtensions[] = 'gd';
|
||||
extension_loaded('iconv') || $missingExtensions[] = 'iconv';
|
||||
extension_loaded('json') || $missingExtensions[] = 'json';
|
||||
extension_loaded('libxml') || $missingExtensions[] = 'libxml';
|
||||
extension_loaded('mysqli') || $missingExtensions[] = 'mysqli';
|
||||
extension_loaded('soap') || $missingExtensions[] = 'soap';
|
||||
extension_loaded('tokenizer') || $missingExtensions[] = 'tokenizer';
|
||||
extension_loaded('xml') || $missingExtensions[] = 'xml';
|
||||
|
||||
if ($missingExtensions) {
|
||||
$issues[] = 'Your Composer dependencies require the following PHP extensions to be installed: ' . implode(', ', $missingExtensions) . '.';
|
||||
}
|
||||
|
||||
if ($issues) {
|
||||
if (!headers_sent()) {
|
||||
header('HTTP/1.1 500 Internal Server Error');
|
||||
|
||||
Reference in New Issue
Block a user