Skip to content

Some filenames can be lost in log file selection list #2627

Closed
@ddb4github

Description

@ddb4github

array plus(+) operator will ignore some item with same key, even key is just serial no like 0, 1
So the first two file of $stdLogFileArray is always ignore.

--- lib/clog_webapi.php 2019-03-31 02:45:32.000000000 +0800
+++ lib/clog_webapi.php       2019-04-13 12:43:37.707854996 +0800
@@ -467,7 +467,8 @@
                                                arsort($stdLogFileArray, SORT_NATURAL);
                                                arsort($stdErrFileArray, SORT_NATURAL);

-                                               $logFileArray = $stdFileArray + $stdLogFileArray + $stdErrFileArray;
+                                               sort($stdLogFileArray);
+                                               $logFileArray = array_merge($stdFileArray, $stdLogFileArray, $stdErrFileArray);

                                                if (cacti_sizeof($logFileArray)) {
                                                        foreach ($logFileArray as $logFile) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUndesired behaviourresolvedA fixed issue

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions