Commit ce9c8f4
authored
Update Socket.php (#156)
On PHP >= 8.1 this throws a TypeError
```
Uncaught TypeError: fclose(): Argument #1 ($stream) must be of type resource, bool given in .\vendor\xpaw\php-source-query-class\SourceQuery\Socket.php:32
```
Because a failed connection server sets this to boolean false. Better to check if the parameter passed to `fclose()` is an actual resource/stream.1 parent f38c42b commit ce9c8f4
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
0 commit comments