Ad Widget

Collapse

PATCH: Fixes empty columns in tables. [zabbix V1.4.5]

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Aly
    ZABBIX developer
    • May 2007
    • 1126

    #1

    PATCH: Fixes empty columns in tables. [zabbix V1.4.5]

    Empty columns in FrontEnd. Apply this patch to fix this issue:
    Attached Files
    Zabbix | ex GUI developer
  • Shmuma
    Member
    • Nov 2007
    • 49

    #2
    Hello,

    could you explain why you check for column datatype? We recently faced with the same problem on MySQL (problem was caused by my patch, sorry ), but I resolved it this way:
    Code:
    diff --git a/frontends/php/include/db.inc.php b/frontends/php/include/db.inc.php
    index 91ca39e..4f22c7b 100644
    --- a/frontends/php/include/db.inc.php
    +++ b/frontends/php/include/db.inc.php
    @@ -418,7 +418,7 @@ COpt::savesqlrequest($query);
                                    {
                                            $result = array();
                                            $keys = (array_keys($row));
    -                                       foreach ($keys as $k)           $result[strtolower($k)] = $row[$k];
    +                                       foreach ($keys as $k)           $result[strtolower($k)] = is_null ($row[$k]) ? "" : $row[$k];
                                    }
                                    break;
                            case "SQLITE3":
    Did I overlooked something?

    Comment

    • Aly
      ZABBIX developer
      • May 2007
      • 1126

      #3
      Empty string should replace null value in oracle DB result, only if column type is varchar2, clob.

      Why to replace numeric types when they shouldn't be returned as empty strings..
      Zabbix | ex GUI developer

      Comment

      Working...