Title: [v1.11.0] Accessing array offset on null value - Failed TCP connection without ext-sockets · Issue #286 · reactphp/socket · GitHub
Open Graph Title: [v1.11.0] Accessing array offset on null value - Failed TCP connection without ext-sockets · Issue #286 · reactphp/socket
X Title: [v1.11.0] Accessing array offset on null value - Failed TCP connection without ext-sockets · Issue #286 · reactphp/socket
Description: I'm receiving the following error in this line: ErrorException : Trying to access array offset on value of type null at /var/www/html/vendor/react/socket/src/TcpConnector.php:123 119| @\fwrite($stream, \PHP_EOL); 120| $error = \error_get...
Open Graph Description: I'm receiving the following error in this line: ErrorException : Trying to access array offset on value of type null at /var/www/html/vendor/react/socket/src/TcpConnector.php:123 119| @\fwrite($str...
X Description: I'm receiving the following error in this line: ErrorException : Trying to access array offset on value of type null at /var/www/html/vendor/react/socket/src/TcpConnector.php:123 119| @\fwrite(...
Opengraph URL: https://github.com/reactphp/socket/issues/286
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[v1.11.0] Accessing array offset on null value - Failed TCP connection without ext-sockets","articleBody":"I'm receiving the following error in [this line](https://github.com/reactphp/socket/blob/master/src/TcpConnector.php#L123):\r\n```\r\n ErrorException : Trying to access array offset on value of type null\r\n\r\n at /var/www/html/vendor/react/socket/src/TcpConnector.php:123\r\n 119| @\\fwrite($stream, \\PHP_EOL);\r\n 120| $error = \\error_get_last();\r\n 121| \r\n 122| // fwrite(): send of 2 bytes failed with errno=111 Connection refused\r\n > 123| \\preg_match('/errno=(\\d+) (.+)/', $error['message'], $m);\r\n 124| $errno = isset($m[1]) ? (int) $m[1] : 0;\r\n 125| $errstr = isset($m[2]) ? $m[2] : $error['message'];\r\n 126| } else {\r\n 127| // Not on Linux and ext-sockets not available? Too bad.\r\n\r\n Exception trace:\r\n\r\n 1 Illuminate\\Foundation\\Bootstrap\\HandleExceptions::handleError(\"Trying to access array offset on value of type null\", \"/var/www/html/vendor/react/socket/src/TcpConnector.php\")\r\n /var/www/html/vendor/react/socket/src/TcpConnector.php:123\r\n\r\n 2 React\\Socket\\TcpConnector::React\\Socket\\{closure}()\r\n /var/www/html/vendor/react/event-loop/src/StreamSelectLoop.php:253\r\n\r\n Please use the argument -v to see more details.\r\n\r\n```\r\n\r\nThe `$error` is `null`, but I have no idea why.\r\nI'm using [another library](https://github.com/beyondcode/laravel-websockets) that depends on this one indirectly.\r\n\r\nThe composer require tree:\r\n```\r\nbeyondcode/laravel-websockets 1.8.1 An easy to use WebSocket server\r\n├──cboden/ratchet ^0.4.1\r\n│ └──react/socket ^1.0 || ^0.8 || ^0.7 || ^0.6 || ^0.5\r\n└──clue/buzz-react ^2.5\r\n ├──react/http-client ^0.5.10\r\n | └──react/socket ^1.0 || ^0.8.4\r\n └──react/socket ^1.1\r\n```\r\n\r\nPHP version:\r\n```\r\nPHP 7.4.27 (cli) (built: Dec 16 2021 22:42:18) ( NTS )\r\nCopyright (c) The PHP Group\r\nZend Engine v3.4.0, Copyright (c) Zend Technologies\r\n```","author":{"url":"https://github.com/matheusb-comp","@type":"Person","name":"matheusb-comp"},"datePublished":"2022-03-12T00:19:44Z","url":"https://github.com/reactphp/socket/issues/286"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:df8cf464-3306-5055-dca4-26ed5b4dfe31 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CC9A:39ED8:1DD816:2995B1:6B00582E |
| html-safe-nonce | a9f7340d809a8314542fd4221839d6d8002f3603822287b8930c7d375593db08 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQzlBOjM5RUQ4OjFERDgxNjoyOTk1QjE6NkIwMDU4MkUiLCJ2aXNpdG9yX2lkIjoiODExMzg2MjQ0ODU2MzM3ODIyMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e601902a7a5635bdb0ed22da8f1124007f5615d153d591f47a07da95c49e542d |
| hovercard-subject-tag | issue:1167056552 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/reactphp/socket/286/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2a570791a177dd1d4c053a5e1575065d9d4b5c73afa316d06d8e67fd61f19670/reactphp/socket/issues/286 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2a570791a177dd1d4c053a5e1575065d9d4b5c73afa316d06d8e67fd61f19670/reactphp/socket/issues/286 |
| og:image:alt | I'm receiving the following error in this line: ErrorException : Trying to access array offset on value of type null at /var/www/html/vendor/react/socket/src/TcpConnector.php:123 119| @\fwrite($str... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | matheusb-comp |
| hostname | github.com |
| expected-hostname | github.com |
| None | 29be975efff6507a5d135de9c7d634cf7ff8f0c55222a64386ab3202209aaf73 |
| turbo-cache-control | no-preview |
| go-import | github.com/reactphp/socket git https://github.com/reactphp/socket.git |
| octolytics-dimension-user_id | 1696866 |
| octolytics-dimension-user_login | reactphp |
| octolytics-dimension-repository_id | 4287591 |
| octolytics-dimension-repository_nwo | reactphp/socket |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 4287591 |
| octolytics-dimension-repository_network_root_nwo | reactphp/socket |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | eacd927ba6112e3b01ba99c762bd699a4a4f5df7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width