[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] tiki-check.php fix warnings

"Sammy Ndabo \(@ndabosam084\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6912044d7edb4_2ce2ae038441@gitlab-sidekiq-low-urgency-cpu-bound-v2-6ffb4cd6d8-kw9x4.mail>

Sammy Ndabo pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
200e4d87 by Sammy Ndabo at 2025-11-10T15:18:51+00:00
[FIX] tiki-check.php fix warnings
---
* [FIX] tiki-check.php: Update array initialization syntax for consistency

* [FIX] tiki-check.php: getDbKeyDefinitions() updated to original format

* [FIX] tiki-check.php: Resolve undefined variable and array key warnings

See merge request tikiwiki/tiki!8996

- - - - -


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 = array();
     $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);
@@ -3858,15 +3859,15 @@ function getDbKeyDefinitions($tableName)
     SELECT 
         INDEX_NAME, 
         TABLE_NAME,
-        GROUP_CONCAT(COLUMN_NAME ORDER BY SEQ_IN_INDEX) AS INDEX_COLUMNS, 
+        GROUP_CONCAT(COLUMN_NAME ORDER BY SEQ_IN_INDEX) AS INDEX_COLUMNS,
     CASE 
-        WHEN NON_UNIQUE = 0 AND INDEX_NAME = 'PRIMARY' 
+        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 
+    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/200e4d87faac7360a2cee4043b7f1a1b02429b1e

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/200e4d87faac7360a2cee4043b7f1a1b02429b1e
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.