Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getViewer #203

Open
Grepher76380 opened this issue Apr 28, 2023 · 6 comments
Open

getViewer #203

Grepher76380 opened this issue Apr 28, 2023 · 6 comments

Comments

@Grepher76380
Copy link

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::getClass(): Argument #1 ($prefix) must be of type string, null given, called in /var/www/vhosts/codeigniter.maltospeak.com/httpdocs/vendor/planetteamspeak/ts3-php-framework/src/Viewer/Html.php on line 185

code use :

$ts3 = $this->libts->factory($uri);
$data['viewer'] = $ts3->getViewer(new Html("../assets/images/viewer/", "../assets/images/flags/", "data:image"));

Use codeigniter4 and php 8.1 and ts3phpframework version dev.

@ronindesign
Copy link
Collaborator

We had some incompatible errors with PHP 8.1/8.2, please try again with dev branch and see if you still receive the error.

@Grepher76380
Copy link
Author

Fatal error: Allowed memory size of 1585446912 bytes exhausted (tried to allocate 1073741824 bytes) in /var/www/vhosts/maltospeak.com/httpdocs/vendor/planetteamspeak/ts3-php-framework/src/Helper/StringHelper.php on line 211

planetteamspeak/ts3-php-framework: "dev-dev",
php : 8.1.21

Sorry

@ronindesign
Copy link
Collaborator

That appears to be another issue. If you're not still getting the Node::getClass() exception, we should probably close this for now.

@Grepher76380
Copy link
Author

Grepher76380 commented Aug 3, 2023

humm,

I put the dev version, I had to add in the file: planetteamspeak/ts3-php-framework/src/Transport/TCP.php

public function readLine(string $token = "\n"): StringHelper
{
$this->connect();

    $line = StringHelper::factory("");

    while (!$line->endsWith($token)) {
        $this->waitForReadyRead();

        $data = @fgets($this->stream, 4096);

        Signal::getInstance()->emit(strtolower($this->getAdapterType()) . "DataRead", $data);

        if ($data === false) {
            if ($line->count()) {
                $line->append($token);
            } else {
                throw new TransportException("connection to server '" . $this->config["host"] . ":" . $this->config["port"] . "' lost");
            }
        } else {
            $line->append($data);
        }
    }

    return $line->trim();
}

no error ( Fatal error: Allowed memory size of 1585446912 bytes exhausted (tried to allocate 1073741824 bytes) in /var/www/vhosts/maltospeak.com/httpdocs/vendor/planetteamspeak/ts3-php-framework/src/Helper/StringHelper.php on line 211 )

just

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::getClass(): Argument #1 ($prefix) must be of type string, null given, called in /var/www/vhosts/maltospeak.com/httpdocs/vendor/planetteamspeak/ts3-php-framework/src/Viewer/Html.php on line 185

look : https://maltospeak.com/PanelTeamspeak/viewer/13510/14510

@ronindesign
Copy link
Collaborator

I believe this was just fixed in dev on #195 as of today. Would you please try pulling latest version of dev? (Latest commit id is 2d4690eb6cbb08013d354b49271ab3d78debf305)

@Sebbo94BY
Copy link
Collaborator

@ronindesign The problem is, that composer is still on 990b41a for the dev branch. See #184.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants