fix php 8.0 errors in backend
Dieser Commit ist enthalten in:
Ursprung
b3f4d9ee27
Commit
586188c2cc
|
@ -133,6 +133,8 @@ function dbUpgradeTable($db, $table, $field, $type, $null, $key, $default, $extr
|
|||
} else {
|
||||
$parameter['DEFAULT'] = "DEFAULT '" . Contenido_Security::escapeDB($default, $db) . "'";
|
||||
}
|
||||
} else {
|
||||
$parameter['DEFAULT'] = '';
|
||||
}
|
||||
|
||||
if (!dbTableExists($db, $table)) {
|
||||
|
@ -145,7 +147,7 @@ function dbUpgradeTable($db, $table, $field, $type, $null, $key, $default, $extr
|
|||
// Remove auto_increment
|
||||
$structure = dbGetColumns($db, $table);
|
||||
|
||||
if ($structure[$field]["Extra"] == "auto_increment") {
|
||||
if (isset($structure[$field]) && !empty($structure[$field]["Extra"]) && $structure[$field]["Extra"] == "auto_increment") {
|
||||
if ($structure[$field]['NULL'] == "") {
|
||||
$structure[$field]['NULL'] = "NOT NULL";
|
||||
}
|
||||
|
|
|
@ -396,6 +396,7 @@ function getLanguagesByClient($client) {
|
|||
function getLanguageNamesByClient($client) {
|
||||
global $db;
|
||||
global $cfg;
|
||||
$list = [];
|
||||
|
||||
$sql = "SELECT
|
||||
a.idlang AS idlang,
|
||||
|
@ -1327,7 +1328,9 @@ function array_csort() { //coded by Ichier2003
|
|||
$msortline .= "\$sortarr[" . $i . "],";
|
||||
}
|
||||
$msortline .= "\$marray));";
|
||||
if(is_array($marray) && count($marray) > 0) {
|
||||
@ eval($msortline);
|
||||
}
|
||||
return $marray;
|
||||
}
|
||||
|
||||
|
|
|
@ -754,7 +754,7 @@ if (isset($bDebug) && $bDebug === true) {
|
|||
var_dump($navigationTree);
|
||||
echo '</pre>';
|
||||
}
|
||||
if (count($navigationTree[0])) {
|
||||
if (is_array($navigationTree[0]) && count($navigationTree[0])) {
|
||||
$sCategories = showTree(0, $aWholelist);
|
||||
}
|
||||
|
||||
|
|
|
@ -57,6 +57,9 @@ $currentstep = (empty($_GET['step'])) ? 1 : filter_input(INPUT_GET, "step", FILT
|
|||
// Count DB Chunks
|
||||
$file = fopen('data/tables.txt', 'r');
|
||||
$step = 1;
|
||||
$count = 1;
|
||||
$fullcount = 1;
|
||||
|
||||
while (($data = fgetcsv($file, 4000, ';')) !== false) {
|
||||
if ($count == 50) {
|
||||
$count = 1;
|
||||
|
@ -71,7 +74,7 @@ while (($data = fgetcsv($file, 4000, ';')) !== false) {
|
|||
}
|
||||
dbUpgradeTable($db, $_SESSION['dbprefix'] . '_' . $data[0], $data[1], $data[2], $data[3], $data[4], $data[5], $data[6], '', $drop);
|
||||
|
||||
if ($db->errno != 0) {
|
||||
if ($db->getErrorNumber() != 0) {
|
||||
$_SESSION['install_failedupgradetable'] = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ function remove_remarks($sql) {
|
|||
|
||||
for ($i = 0; $i < $linecount; $i++) {
|
||||
if (($i != ($linecount - 1)) || (strlen($lines[$i]) > 0)) {
|
||||
if ($lines[$i][0] != "#") {
|
||||
if (!empty($lines[$i][0]) && $lines[$i][0] != "#") {
|
||||
$output .= $lines[$i] . "\n";
|
||||
} else {
|
||||
$output .= "\n";
|
||||
|
|
|
@ -97,13 +97,13 @@ class cSetupSetupSummary extends cSetupMask {
|
|||
|
||||
public function _getSelectedAdditionalPlugins() {
|
||||
$aPlugins = array();
|
||||
if ($_SESSION['plugin_newsletter'] == 'true') {
|
||||
if (isset($_SESSION['plugin_newsletter']) && $_SESSION['plugin_newsletter'] == 'true') {
|
||||
$aPlugins[] = i18n_setup('Newsletter');
|
||||
}
|
||||
if ($_SESSION['plugin_content_allocation'] == 'true') {
|
||||
if (isset($_SESSION['plugin_content_allocation']) && $_SESSION['plugin_content_allocation'] == 'true') {
|
||||
$aPlugins[] = i18n_setup('Content Allocation');
|
||||
}
|
||||
if ($_SESSION['plugin_mod_rewrite'] == 'true') {
|
||||
if (isset($_SESSION['plugin_mod_rewrite']) && $_SESSION['plugin_mod_rewrite'] == 'true') {
|
||||
$aPlugins[] = i18n_setup('Mod Rewrite');
|
||||
}
|
||||
return $aPlugins;
|
||||
|
|
Laden…
In neuem Issue referenzieren