Open MajorOli opened 11 months ago
I don't know what you really want to do but you can use $ts3_VirtualServer->channelGetByName("MyChannel")
to get all properties about your channel and use $ts3_VirtualServer->clientInfoDb(dbid)
to get all properties about your client.
I want to get all properties from a channel or from the clientInfoDb. At some channels or clientInfoDb (but not at all) the convert error will thrown. But I can not find the property which triggers this error.
//get all channels as collection without SubChannels
$ts3Channels = collect($ts3_VirtualServer->channelList(['pid'=>0]));
foreach ($ts3Channels->keys()->all() as $cid)
{
//get channel by id
$channel = $ts3_VirtualServer->channelGetById($cid);
//get channel info
$channelInfo = $channel->getInfo();
//DO SOMETHING
}
//TS3 DATABASE
$usersTs3DB = collect($ts3_VirtualServer->clientListDb());
foreach ($usersTs3DB->keys()->all() as $cldbid)
{
//get userinfo by db id
$userDbInfo = $ts3_VirtualServer->clientInfoDb($cldbid);
//DO SOMETHING
}
Info: After i downgrade to Version 1.2.0 the error will not thrown anymore.
Im try to Upgrade to Version 1.2.1 with PHP 8.1 and now i get the following error:
For channel->getInfo()
channel->getInfo()
will throw the error withbool $extend = true
when switch tobool $extend = false
the error will not thrownFor ts3_VirtualServer->clientInfoDb()