Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-11485

zbx_is_int() usage issue

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 2.0.20rc1, 2.2.16rc1, 3.0.6rc1, 3.2.2rc1, 3.4.0alpha1
    • Frontend (F)

      preg_match() expects parameter 2 to be string, array given [hosts.php:140 ? CFrontendApiWrapper->update() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? call_user_func_array() ? CScreenItem->update() ? CScreenItem->validateUpdate() ? CScreenItem->checkSpans() ? zbx_is_int() ? preg_match() in include\func.inc.php:856]
      

      If value is array

      Example:

      $test = API::ScreenItem()->update([
        'screenid' => '115',
        'resourcetype' => '0',
        'caption' => '2.0.15_triggers: 3',
        'style' => '0',
        'url' => '',
        'width' => '500',
        'height' => '100',
        'halign' => '0',
        'valign' => '0',
        'colspan' => [1],
        'rowspan' => '1',
        'max_columns' => null,
        'dynamic' => 0,
        'elements' => 0,
        'sort_triggers' => 0,
        'application' => '',
        'resourceid' => '1438',
        'screenitemid' => '755'
      ]);
      

      'colspan' => [1]

      zbx_is_int() used everywhere!

            Unassigned Unassigned
            oleg.egorov Oleg Egorov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: