Title: Error when executing Site_Command::create · Issue #392 · wp-cli/entity-command · GitHub
Open Graph Title: Error when executing Site_Command::create · Issue #392 · wp-cli/entity-command
X Title: Error when executing Site_Command::create · Issue #392 · wp-cli/entity-command
Description: Bug Report [ x] Yes, I reviewed the contribution guidelines. [ x] Yes, more specifically, I reviewed the guidelines on how to write clear bug reports. Describe the current, buggy behavior When using the command site create, I have the er...
Open Graph Description: Bug Report [ x] Yes, I reviewed the contribution guidelines. [ x] Yes, more specifically, I reviewed the guidelines on how to write clear bug reports. Describe the current, buggy behavior When usin...
X Description: Bug Report [ x] Yes, I reviewed the contribution guidelines. [ x] Yes, more specifically, I reviewed the guidelines on how to write clear bug reports. Describe the current, buggy behavior When usin...
Opengraph URL: https://github.com/wp-cli/entity-command/issues/392
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Error when executing Site_Command::create","articleBody":"## Bug Report\r\n\r\n- [ x] Yes, I reviewed the [contribution guidelines](https://make.wordpress.org/cli/handbook/contributing/).\r\n- [ x] Yes, more specifically, I reviewed the guidelines on [how to write clear bug reports](https://make.wordpress.org/cli/handbook/bug-reports/).\r\n\r\n**Describe the current, buggy behavior**\r\n\r\nWhen using the command site create, I have the error :\r\n\r\nBecause this code relies on `get_super_admins()` and that the key 0 is present. (https://github.com/wp-cli/entity-command/blob/main/src/Site_Command.php#L430)\r\n\r\nOn my case, the `get_super_admins` returns :\r\n```\r\nget_super_admins();\r\n=> array(6) {\r\n [1]=>\r\n string(8) \"aaaa\"\r\n [2]=>\r\n string(8) \"bbb\"\r\n [3]=>\r\n string(6) \"ccccc\"\r\n [4]=>\r\n string(10) \"dddd\"\r\n [5]=>\r\n string(10) \"ffff\"\r\n [6]=>\r\n string(15) \"gggg\"\r\n}\r\n```\r\n\r\n**Describe how other contributors can replicate this bug**\r\nI do not know howto replicate this, maybe delete a super admin ?\r\n\r\n**Describe what you would expect as the correct outcome**\r\n\r\nThat the code find the first by using PHP function.\r\n\r\n**Let us know what environment you are running this on**\r\n\r\n```\r\nOS: Linux 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) x86_64\r\nShell: /bin/bash\r\nPHP binary: /usr/local/share/php8.0/bin/php\r\nPHP version: 8.0.28\r\nphp.ini used: /usr/local/share/php8.0/etc/php.ini\r\nMySQL binary: /usr/bin/mysql\r\nMySQL version: mysql Ver 15.1 Distrib 10.8.5-MariaDB, for debian-linux-gnu (x86_64) using readline EditLine wrapper\r\nSQL modes: \r\nWP-CLI root dir: phar://wp-cli.phar/vendor/wp-cli/wp-cli\r\nWP-CLI vendor dir: phar://wp-cli.phar/vendor\r\nWP_CLI phar path: /home/recette/www/web\r\nWP-CLI packages dir: /home/recette/.wp-cli/packages/\r\nWP-CLI cache dir: /home/recette/.wp-cli/cache\r\nWP-CLI global config: /home/recette/.wp-cli/config.yml\r\nWP-CLI project config: /home/recette/www/wp-cli.yml\r\nWP-CLI version: 2.7.1\r\n```\r\n\r\n**Provide a possible solution**\r\n\r\nUsing `reset` to get the first ?\r\n","author":{"url":"https://github.com/Rahe","@type":"Person","name":"Rahe"},"datePublished":"2023-02-21T13:24:56Z","url":"https://github.com/wp-cli/entity-command/issues/392"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| 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:a3d2e0d8-9ef1-0ec1-00ae-7eeb823020c7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8072:23725B:E1E7AF:135DE72:6AFB5AFC |
| html-safe-nonce | 4fa3e2c0e292482e7448b3ccf3bf9cd09155e0855c96e24067ea702d86cbae8f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MDcyOjIzNzI1QjpFMUU3QUY6MTM1REU3Mjo2QUZCNUFGQyIsInZpc2l0b3JfaWQiOiIyMzEyNjY1ODExMzcxMzgzNTQ4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | ea34183ee9e179f89288e978f8f93a41f7862cf4e3468900a00af78e8ee4a6e5 |
| hovercard-subject-tag | issue:1593481063 |
| 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/wp-cli/entity-command/392/issue_layout |
| twitter:image | https://opengraph.githubassets.com/619f65a0db22bf181baa3de643d10dbb59fe5fcc3431301e3b1c78a3283b48a4/wp-cli/entity-command/issues/392 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/619f65a0db22bf181baa3de643d10dbb59fe5fcc3431301e3b1c78a3283b48a4/wp-cli/entity-command/issues/392 |
| og:image:alt | Bug Report [ x] Yes, I reviewed the contribution guidelines. [ x] Yes, more specifically, I reviewed the guidelines on how to write clear bug reports. Describe the current, buggy behavior When usin... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Rahe |
| hostname | github.com |
| expected-hostname | github.com |
| None | ea33d13c96d0ff66bd8fa906b193d2213536b78cb06b0c50a4632c58b1418f94 |
| turbo-cache-control | no-preview |
| go-import | github.com/wp-cli/entity-command git https://github.com/wp-cli/entity-command.git |
| octolytics-dimension-user_id | 1570774 |
| octolytics-dimension-user_login | wp-cli |
| octolytics-dimension-repository_id | 87201389 |
| octolytics-dimension-repository_nwo | wp-cli/entity-command |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 87201389 |
| octolytics-dimension-repository_network_root_nwo | wp-cli/entity-command |
| 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 | 59ef97164c52cf59bd10558ddec9c4f482763988 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width