You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In 3.x dev, the default is to return an associative array. That breaks all past code. I appreciate having the option, but can it default to an object to not break old code? Or maybe an API level option to set the default return mode?
$api->defaultReturnMode(ZABBIX::RET_ASSOC)
Then in each method, instead of $assoc = true, use $mode=null and use those same variables for overriding the default return mode?
$api->hostGet([],null,ZABBIX::RET_ASSOC);
With this setup, you could change the default to assoc, but allow us to change the default to keep old code working.
The text was updated successfully, but these errors were encountered:
In 3.x dev, the default is to return an associative array. That breaks all past code. I appreciate having the option, but can it default to an object to not break old code? Or maybe an API level option to set the default return mode?
$api->defaultReturnMode(ZABBIX::RET_ASSOC)
Then in each method, instead of $assoc = true, use $mode=null and use those same variables for overriding the default return mode?
$api->hostGet([],null,ZABBIX::RET_ASSOC);
With this setup, you could change the default to assoc, but allow us to change the default to keep old code working.
The text was updated successfully, but these errors were encountered: