Uploaded image for project: 'Observium'
  1. Observium
  2. OBS-2649

PHP crash when poller queries bind application

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • None
    • Professional Edition
    • Unix Agent

    Description

      [root@nms observium]# ./poller.php -h <DNSserver>
      ...
      #####  Starting polling run at 2018-04-12 06:11:23  #####
      #####  <DNSserver> [235]  #####
      ....
      #####  Module Start: applications  #####

       o Applications        bind .PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function array_sort(), 1 passed in /opt/observium/includes/polling/applications/bind.inc.php on line 82 and at least 2 expected in /opt/observium/includes/functions.inc.php:186
      Stack trace:
      #0 /opt/observium/includes/polling/applications/bind.inc.php(82): array_sort(Array)
      #1 /opt/observium/includes/polling/applications.inc.php(33): include('/opt/observium/...')
      #2 /opt/observium/includes/polling/functions.inc.php(682): include('/opt/observium/...')
      #3 /opt/observium/poller.php(172): poll_device(Array, Array)
      #4 {main}
        thrown in /opt/observium/includes/functions.inc.php on line 186
      [root@nms observium]#

       

       

       

      Fixed by:

      [root@nms observium]# svn diff /opt/observium/includes/polling/applications/bind.inc.php

      Index: /opt/observium/includes/polling/applications/bind.inc.php
      ===================================================================
      --- /opt/observium/includes/polling/applications/bind.inc.php	(revision 9181)
      +++ /opt/observium/includes/polling/applications/bind.inc.php	(working copy)
      @@ -79,7 +79,7 @@
         );
       
         $ns_stats_fields = array_values($ns_stats_field_mapping);
      -  array_sort($ns_stats_fields);
      +  array_sort($ns_stats_fields, 'Requestv4');
       
         $ns_stats = array();
         foreach ($ns_stats_fields as $field)
      @@ -105,7 +105,7 @@
         );
       
         $zone_maint_fields = array_values($zone_maint_field_mapping);
      -  array_sort($zone_maint_fields);
      +  array_sort($zone_maint_fields, 'NotifyOutv4');
       
         $zone_maint = array();
         foreach ($zone_maint_fields as $field)
      @@ -148,7 +148,7 @@
         );
       
         $resolver_fields = array_values($resolver_field_mapping);
      -  array_sort($resolver_fields);
      +  array_sort($resolver_fields, 'Queryv4');
       
         $resolver = array();
      
      

      Attachments

        Issue Links

          Activity

            People

              sid3windr Tom Laermans
              mmoens@iventmobile.nl Martin Moens
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: