-
Incident report
-
Resolution: Unresolved
-
Trivial
-
None
-
2.0.20rc1, 2.2.16rc1, 3.0.6rc1, 3.2.2rc1, 3.4.0alpha1
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!
- duplicates
-
ZBX-3783 Proper API validation
- Reopened