René's URL Explorer Experiment


Title: Table::getDisplayLines() can output excessive lines · Issue #164 · wp-cli/php-cli-tools · GitHub

Open Graph Title: Table::getDisplayLines() can output excessive lines · Issue #164 · wp-cli/php-cli-tools

X Title: Table::getDisplayLines() can output excessive lines · Issue #164 · wp-cli/php-cli-tools

Description: Bug Report Yes, I reviewed the contribution guidelines. Yes, more specifically, I reviewed the guidelines on how to write clear bug reports. Describe the current, buggy behavior I'm registering a table with this (simplified) code: $table...

Open Graph Description: Bug Report Yes, I reviewed the contribution guidelines. Yes, more specifically, I reviewed the guidelines on how to write clear bug reports. Describe the current, buggy behavior I'm registering a t...

X Description: Bug Report Yes, I reviewed the contribution guidelines. Yes, more specifically, I reviewed the guidelines on how to write clear bug reports. Describe the current, buggy behavior I'm registering...

Opengraph URL: https://github.com/wp-cli/php-cli-tools/issues/164

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Table::getDisplayLines() can output excessive lines","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\nI'm registering a table with this (simplified) code:\r\n\r\n```php\r\n$table  = new \\cli\\Table();\r\n$ascii  = new \\cli\\table\\Ascii();\r\n$widths = [\r\n\t3, // this is the longest default date format: [24-Sep-2023 20:50:51 UTC]\r\n\t3, // this is the longest default type: PHP Fatal error\r\n\t5, // trigger the overflow and last column max width by defining a very long string length\r\n];\r\n\r\n$ascii->setWidths( $widths );\r\n$table->setRenderer( $ascii );\r\n\r\n$table->setHeaders( [ 'one', 'two', 'three' ] );\r\n\r\n$table->display();\r\n```\r\n\r\nMethod Table::() returns this data:\r\n\r\n```\r\narray:4 [▶\r\n  0 => \"+----------------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\"\r\n  1 => \"| One                       | Two            | Three                                                                                                                                                                                                                                                             |\"\r\n  2 => \"+----------------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\"\r\n  3 => \"+----------------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\"\r\n]\r\n```\r\n\r\nAs you can see, array values for 2 and 3 are the same - bottom border.\r\n\r\nThis is because I output just the table, without rows (I plan to use `->addRow()` later). And because this code in this library:\r\n\r\n```php\r\nforeach ($this->_rows as $row) {\r\n\t$row = $this->_renderer->row($row);\r\n\t$row = explode( PHP_EOL, $row );\r\n\t$out = array_merge( $out, $row );\r\n}\r\n\r\nif (isset($border)) {\r\n\t$out[] = $border;\r\n}\r\n```\r\n\r\nDoes not check whether rows is actually not empty.\r\n\r\n**Describe what you would expect as the correct outcome**\r\n\r\nIf there is a header but no rows - we should display only 1 border.\r\n\r\n**Let us know what environment you are running this on**\r\n\r\n```\r\nOS:     Darwin 22.6.0 Darwin Kernel Version 22.6.0: Fri Sep 15 13:41:28 PDT 2023; root:xnu-8796.141.3.700.8~1/RELEASE_ARM64_T6000 arm64\r\nShell:  /bin/zsh\r\nPHP binary:     /opt/homebrew/Cellar/php/8.2.10/bin/php\r\nPHP version:    8.2.10\r\nphp.ini used:   /opt/homebrew/etc/php/8.2/php.ini\r\nMySQL binary:   \r\nMySQL version:  \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:       /Users/slaffik/Projects/[redacted]\r\nWP-CLI packages dir:    /Users/slaffik/.wp-cli/packages/\r\nWP-CLI cache dir:       /Users/slaffik/.wp-cli/cache\r\nWP-CLI global config:   \r\nWP-CLI project config:  \r\nWP-CLI version: 2.8.1\r\n\r\n```\r\n\r\n**Provide a possible solution**\r\n\r\nI will create a PR.\r\n","author":{"url":"https://github.com/slaFFik","@type":"Person","name":"slaFFik"},"datePublished":"2023-09-28T21:06:01Z","url":"https://github.com/wp-cli/php-cli-tools/issues/164"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:3f251c55-e821-12ed-6dcc-3d9c8e75fb92
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCC66:18034D:3F7E025:53BBF93:6AFA3B27
html-safe-nonce4eca87dc5ac0d87776e024b86e32b4af3a09f90255eab03873538831ee320ebb
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQzY2OjE4MDM0RDozRjdFMDI1OjUzQkJGOTM6NkFGQTNCMjciLCJ2aXNpdG9yX2lkIjoiMzAxNTAyNDU0MDU5MDQyMjgyMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacf7a20fe465bb74ed9d285b86a85106494c8e5741052f31d01cdd4ca5dd44b5fa
hovercard-subject-tagissue:1918274160
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/wp-cli/php-cli-tools/164/issue_layout
twitter:imagehttps://opengraph.githubassets.com/49d34263f6a56bd45892bae8ef3924d22d3b023233c1de86039a7f5a3801d4f9/wp-cli/php-cli-tools/issues/164
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/49d34263f6a56bd45892bae8ef3924d22d3b023233c1de86039a7f5a3801d4f9/wp-cli/php-cli-tools/issues/164
og:image:altBug Report Yes, I reviewed the contribution guidelines. Yes, more specifically, I reviewed the guidelines on how to write clear bug reports. Describe the current, buggy behavior I'm registering a t...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameslaFFik
hostnamegithub.com
expected-hostnamegithub.com
None612d3e6ffd693e7ea8d9fcf452370995872baef31d825b1fedef704cd3d24ac7
turbo-cache-controlno-preview
go-importgithub.com/wp-cli/php-cli-tools git https://github.com/wp-cli/php-cli-tools.git
octolytics-dimension-user_id1570774
octolytics-dimension-user_loginwp-cli
octolytics-dimension-repository_id587642
octolytics-dimension-repository_nwowp-cli/php-cli-tools
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id587642
octolytics-dimension-repository_network_root_nwowp-cli/php-cli-tools
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release072e34035c13c31543fba9f025cbbbda4210dae4
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/wp-cli/php-cli-tools/issues/164#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fwp-cli%2Fphp-cli-tools%2Fissues%2F164
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fwp-cli%2Fphp-cli-tools%2Fissues%2F164
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=wp-cli%2Fphp-cli-tools
Reloadhttps://github.com/wp-cli/php-cli-tools/issues/164
Reloadhttps://github.com/wp-cli/php-cli-tools/issues/164
Reloadhttps://github.com/wp-cli/php-cli-tools/issues/164
wp-clihttps://github.com/wp-cli
php-cli-toolshttps://github.com/wp-cli/php-cli-tools
Codehttps://github.com/wp-cli/php-cli-tools
Issueshttps://github.com/wp-cli/php-cli-tools/issues
Pull requestshttps://github.com/wp-cli/php-cli-tools/pulls
Actionshttps://github.com/wp-cli/php-cli-tools/actions
Security and qualityhttps://github.com/wp-cli/php-cli-tools/security
Insightshttps://github.com/wp-cli/php-cli-tools/pulse
https://github.com/wp-cli/php-cli-tools
New issuehttps://github.com/login?return_to=https://github.com/wp-cli/php-cli-tools/issues/164
New issuehttps://github.com/login?return_to=https://github.com/wp-cli/php-cli-tools/issues/164
#190https://github.com/wp-cli/php-cli-tools/pull/190
Table::getDisplayLines() can output excessive lineshttps://github.com/wp-cli/php-cli-tools/issues/164#top
#190https://github.com/wp-cli/php-cli-tools/pull/190
scope:tablehttps://github.com/wp-cli/php-cli-tools/issues?q=state%3Aopen%20label%3A%22scope%3Atable%22
https://github.com/slaFFik
slaFFikhttps://github.com/slaFFik
on Sep 28, 2023https://github.com/wp-cli/php-cli-tools/issues/164#issue-1918274160
contribution guidelineshttps://make.wordpress.org/cli/handbook/contributing/
how to write clear bug reportshttps://make.wordpress.org/cli/handbook/bug-reports/
slaFFikhttps://github.com/slaFFik
on Sep 28, 2023https://github.com/wp-cli/php-cli-tools/issues/164#event-10504303455
Table::getDisplayLines() should not output excessive lineshttps://github.com/slaFFik/php-cli-tools/commit/4d4b774f251f217fed25892983b6b5c2167d659c
https://docs.github.com/articles/closing-issues-via-commit-messages
4d4b774https://github.com/slaFFik/php-cli-tools/commit/4d4b774f251f217fed25892983b6b5c2167d659c
danielbachhuberhttps://github.com/danielbachhuber
scope:tablehttps://github.com/wp-cli/php-cli-tools/issues?q=state%3Aopen%20label%3A%22scope%3Atable%22
on Sep 29, 2023https://github.com/wp-cli/php-cli-tools/issues/164#event-10512133430
https://github.com/danielbachhuber
danielbachhuberhttps://github.com/danielbachhuber
on Sep 29, 2023https://github.com/wp-cli/php-cli-tools/issues/164#issuecomment-1740990717
swissspidyhttps://github.com/swissspidy
Add ability to add row in a loop to existing table #190https://github.com/wp-cli/php-cli-tools/pull/190
on Jan 20, 2026https://github.com/wp-cli/php-cli-tools/issues/164#event-22172484463
swissspidyhttps://github.com/swissspidy
completedhttps://github.com/wp-cli/php-cli-tools/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jan 20, 2026https://github.com/wp-cli/php-cli-tools/issues/164#event-22172485597
Sign up for freehttps://github.com/signup?return_to=https://github.com/wp-cli/php-cli-tools/issues/164
Sign in to commenthttps://github.com/login?return_to=https://github.com/wp-cli/php-cli-tools/issues/164
scope:tablehttps://github.com/wp-cli/php-cli-tools/issues?q=state%3Aopen%20label%3A%22scope%3Atable%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.