[TikiWiki-commits] [Git][tikiwiki/tiki][tiki-fix-warnings] [FIX] tiki-check.php: Resolve undefined variable and array key warnings

"Sammy Ndabo \(@ndabosam084\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6911fce8d3177_2d716d305429@gitlab-sidekiq-low-urgency-cpu-bound-v2-fc49d4986-bnrzg.mail>

Sammy Ndabo pushed to branch tiki-fix-warnings at Tiki Wiki CMS Groupware / Tiki


Commits:
a3511a77 by Sammy Ndabo at 2025-11-10T17:55:44+03:00
[FIX] tiki-check.php: Resolve undefined variable and array key warnings

- - - - -


1 changed file:

- tiki-check.php


Changes:

=====================================
tiki-check.php
=====================================
@@ -3659,6 +3659,7 @@ function processKeyFields(&$alterTableFile, $tableName, $keyFields, $isUnique =
 // Function used to check db mismatches
 function check_db_mismatches()
 {
+    $diffDbColumns = [];
     $tikiSql = file_get_contents('db/tiki.sql');
     preg_match_all('/CREATE TABLE (?:.(?!;[^\S]))+./s', $tikiSql, $tables);
     preg_match_all("/ALTER TABLE (?:.(?!;[^\S]))+./s", $tikiSql, $alterTables);
@@ -3855,18 +3856,18 @@ function check_db_mismatches()
 function getDbKeyDefinitions($tableName)
 {
     $query = <<<SQL
-    SELECT 
-        INDEX_NAME, 
+    SELECT
+        INDEX_NAME,
         TABLE_NAME,
-        GROUP_CONCAT(COLUMN_NAME ORDER BY SEQ_IN_INDEX) AS INDEX_COLUMNS, 
-    CASE 
-        WHEN NON_UNIQUE = 0 AND INDEX_NAME = 'PRIMARY' 
-            THEN 'PRIMARY' 
+        GROUP_CONCAT(COLUMN_NAME ORDER BY SEQ_IN_INDEX) AS INDEX_COLUMNS,
+    CASE
+        WHEN NON_UNIQUE = 0 AND INDEX_NAME = 'PRIMARY'
+            THEN 'PRIMARY'
         WHEN NON_UNIQUE = 0
             THEN 'UNIQUE'
-        ELSE 'INDEX' 
-    END AS INDEX_TYPE 
-    FROM information_schema.statistics 
+        ELSE 'INDEX'
+    END AS INDEX_TYPE
+    FROM information_schema.statistics
     WHERE TABLE_SCHEMA = database() AND TABLE_NAME = "$tableName"
     GROUP BY INDEX_NAME, NON_UNIQUE;
     SQL;
@@ -4754,7 +4755,7 @@ if ($standalone && ! $nagios) {
         'MCrypt' => $criptLib->getUserCryptDataStats('mcrypt'),
     ));
     $ws_port = $prefs['realtime_port'] ? $prefs['realtime_port'] : '8080';
-    $websocket_full_base_url = $prefs['realtime_full_base_url'];
+    $websocket_full_base_url = $prefs['realtime_full_base_url'] ?? '';
     if (! empty($websocket_full_base_url)) {
         $parts = parse_url($websocket_full_base_url);
         $ws_port = $parts['port'] ?? null;



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/a3511a7750e8ca08d8cfb47181e30ee5a6cedac0

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/a3511a7750e8ca08d8cfb47181e30ee5a6cedac0
You're receiving this email because of your account on gitlab.com.

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.