Title: Incompatibility with PHP 7.4 line 52 src/Util/Str.php · Issue #507 · phpdotenv/phpdotenv · GitHub
Open Graph Title: Incompatibility with PHP 7.4 line 52 src/Util/Str.php · Issue #507 · phpdotenv/phpdotenv
X Title: Incompatibility with PHP 7.4 line 52 src/Util/Str.php · Issue #507 · phpdotenv/phpdotenv
Description: ERROR 500 - Internal Server Error substr() expects parameter 1 to be string, bool given [/var/www/html/vendor/vlucas/phpdotenv/src/Util/Str.php:52] [vendor/vlucas/phpdotenv/src/Util/Str.php:52] substr() [vendor/vlucas/phpdotenv/src/Store...
Open Graph Description: ERROR 500 - Internal Server Error substr() expects parameter 1 to be string, bool given [/var/www/html/vendor/vlucas/phpdotenv/src/Util/Str.php:52] [vendor/vlucas/phpdotenv/src/Util/Str.php:52] sub...
X Description: ERROR 500 - Internal Server Error substr() expects parameter 1 to be string, bool given [/var/www/html/vendor/vlucas/phpdotenv/src/Util/Str.php:52] [vendor/vlucas/phpdotenv/src/Util/Str.php:52] sub...
Opengraph URL: https://github.com/phpdotenv/phpdotenv/issues/507
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Incompatibility with PHP 7.4 line 52 src/Util/Str.php","articleBody":"ERROR 500 - Internal Server Error \r\nsubstr() expects parameter 1 to be string, bool given \\[/var/www/html/vendor/vlucas/phpdotenv/src/Util/Str.php:52\\] \r\n\r\n\\[vendor/vlucas/phpdotenv/src/Util/Str.php:52\\] substr() \r\n\\[vendor/vlucas/phpdotenv/src/Store/File/Reader.php:76\\] Dotenv\\\\Util\\\\Str::utf8() \r\n\\[vendor/phpoption/phpoption/src/PhpOption/Some.php:108\\] Dotenv\\\\Store\\\\File\\\\Reader::Dotenv\\\\Store\\\\File\\\\{closure}() \r\n\\[vendor/vlucas/phpdotenv/src/Store/File/Reader.php:79\\] PhpOption\\\\Some->flatMap() \r\n\\[vendor/vlucas/phpdotenv/src/Store/File/Reader.php:48\\] Dotenv\\\\Store\\\\File\\\\Reader::readFromFile() \r\n\\[vendor/vlucas/phpdotenv/src/Store/FileStore.php:62\\] Dotenv\\\\Store\\\\File\\\\Reader::read() \r\n\\[vendor/vlucas/phpdotenv/src/Dotenv.php:222\\] Dotenv\\\\Store\\\\FileStore->read() \r\n\\[global.php:32\\] Dotenv\\\\Dotenv->load() \r\n\\[process\\_tables.php:3\\] require('/var/www/html/global.php')\r\n\r\nTo fix this, I changed line 52 in /src/Util/Str.php from:\r\n\r\n if (\\\\substr($converted, 0, 3) == \"\\\\xEF\\\\xBB\\\\xBF\") {\r\n\r\nto \r\n\r\n if (\\\\substr(\"$converted\", 0, 3) == \"\\\\xEF\\\\xBB\\\\xBF\") {\r\n\r\nThat appears to have \"fixed\" my problem.","author":{"url":"https://github.com/maietta","@type":"Person","name":"maietta"},"datePublished":"2021-12-18T20:03:47Z","url":"https://github.com/phpdotenv/phpdotenv/issues/507"}
| 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:933423b8-56c6-4cc9-c92a-08750f85c992 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 85C8:7F906:27C4C42:34CF3B1:6B06B715 |
| html-safe-nonce | 0a3ce66cff77dd4df33a6b6fc6f258b23913861905f09cf4f4c0c98bcbfbcfb2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NUM4OjdGOTA2OjI3QzRDNDI6MzRDRjNCMTo2QjA2QjcxNSIsInZpc2l0b3JfaWQiOiI4ODc3MjM0NjM2MDYxODc3OTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c4c50ee51731283ebd6a41f1607135ca927b531ca4743aa676b3eaf05b73b16b |
| hovercard-subject-tag | issue:1083935366 |
| 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/phpdotenv/phpdotenv/507/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1a0d753ccbb7d3118c5c0bd617cbf997500190416d3febbbd744bb4a6c675646/phpdotenv/phpdotenv/issues/507 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1a0d753ccbb7d3118c5c0bd617cbf997500190416d3febbbd744bb4a6c675646/phpdotenv/phpdotenv/issues/507 |
| og:image:alt | ERROR 500 - Internal Server Error substr() expects parameter 1 to be string, bool given [/var/www/html/vendor/vlucas/phpdotenv/src/Util/Str.php:52] [vendor/vlucas/phpdotenv/src/Util/Str.php:52] sub... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | maietta |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9b2b1f32e21f9e529372294897d423fa443a20a3a37bafa95dec0f213469ebfc |
| turbo-cache-control | no-preview |
| go-import | github.com/phpdotenv/phpdotenv git https://github.com/phpdotenv/phpdotenv.git |
| octolytics-dimension-user_id | 320763234 |
| octolytics-dimension-user_login | phpdotenv |
| octolytics-dimension-repository_id | 7769432 |
| octolytics-dimension-repository_nwo | phpdotenv/phpdotenv |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 7769432 |
| octolytics-dimension-repository_network_root_nwo | phpdotenv/phpdotenv |
| 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 | 5402de66059e5821fab003de929c7056c92d863f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width