-
-
Notifications
You must be signed in to change notification settings - Fork 512
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
sphinxapi.php breaks in php 8.2 #1437
Comments
May I ask what the status of this issue is at this time? Thanks. |
May I ask what the status of this issue is at this time? Thanks. No news. Would you like to make a PR with the fixes? |
In Ubuntu 22.04:
and this script:
didn't fail. It also didn't fail with PHP 8.2:
@yitan800 please provide more info on how to reproduce the issue. |
@yitan800 |
I'm closing this issue as it's seems that there's actually no problem and @yitan800 Feel free to reopen in case you can provide a reproducible example. |
Describe the bug
A clear and concise description of what the bug is.
php8.2 is installed by default under ubuntu 22.04. The latest sphinxapi.php breaks in a number of places. The most significant errors are due to the fact that @ Error Suppression operator does not silent fatal errors in php8.2. They are related to how the socket is connected, close and etc.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Given a query and index, calling the function query defined in sphinxapi.php will return results without any errors.
Describe the environment:
bin/searchd -v
orbin/indexer -v
): e.g.3.5.0 1d34c49@200722 release
uname -a
if on a Unix-like system):OS: ubuntu 22.04
PHP: 8.2.10
Messages from log files:
Messages from searchd.log and query.log (if applicable).
Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in sphinxapi.php:1101 Stack trace: #0 sphinxapi.php(1064): SphinxClient->AddQuery() #1 SphinxClient->Query() #2 {main} thrown in sphinxapi.php on line 1101
Fatal error: Uncaught TypeError: fclose(): Argument #1 ($stream) must be of type resource, null given in sphinxapi.php:518 Stack trace: #0 sphinxapi.php(518): fclose() #1 [internal function]: SphinxClient->__destruct() #2 {main} thrown in sphinxapi.php on line 518
Additional context
Add any other context about the problem here.
In case you've faced a crash what
indextool --check
returns.The text was updated successfully, but these errors were encountered: