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

[Insight] Error silenced by the at sign (@) - in src/SphinxClient.php, line 605 #3

Open
peter-gribanov opened this issue Apr 4, 2016 · 0 comments

Comments

@peter-gribanov
Copy link
Owner

in src/SphinxClient.php, line 605

Adding "@" before feof($this->_socket) prevents warning and errors during this function execution from being displayed.
If you need to do that, you should probably implement a better way to qualify and recover from errors, using Exceptions.

    protected function connect()
    {
        if ($this->_socket !== false) {
            // we are in persistent connection mode, so we have a socket
            // however, need to check whether it's still alive
            if (!@feof($this->_socket)) {
                return $this->_socket;
            }

            // force reopen
            $this->_socket = false;

Posted from SensioLabsInsight

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

1 participant