1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-08 21:08:29 +01:00
phorge-phorge/src/view/phui
Andre Klapper d8d65f3f87 Fix PHP 8.1 "strlen(null)" exception on UIExamples' Bars page
Summary:
`strlen()` was used in Phabricator to check if a generic value is a non-empty string.
This behavior is deprecated since PHP 8.1. Phorge adopts `phutil_nonempty_string()` as a replacement.

Note: this may highlight other absurd input values that might be worth correcting
instead of just ignoring. If phutil_nonempty_string() throws an exception in your
instance, report it to Phorge to evaluate and fix that specific corner case.

```
EXCEPTION: (RuntimeException) strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [<arcanist>/src/error/PhutilErrorHandler.php:261]
arcanist(head=master, ref.master=b325304b6e52), phorge(head=uiExamples, ref.master=dd24c94b0741, ref.uiExamples=dd24c94b0741)
  #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/view/phui/PHUISegmentBarSegmentView.php:58]
```

Closes T15441

Test Plan:
After applying this change, going to `/uiexample/view/PhabricatorAphrontBarUIExample/`,"Bars (PhabricatorAphrontBarUIExample)" renders with beautiful colors.

To see that page, enable prototypes with:

    ./bin/config set phabricator.show-prototypes true

Also try to create a Milestone on a Project, with the Config `maniphest.points` enabled, and try to create some Tasks with different points. Visit its Workboard to see the bar that still works with a useful tooltip.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: speck, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15441

Differential Revision: https://we.phorge.it/D25272
2023-06-03 11:50:52 +02:00
..
__tests__ Ensure that PHUIInvisibleCharacterTestCase is compatible with PHP 5.3 2016-11-15 14:46:22 -08:00
calendar Fix errors found by PHPStan 2017-02-18 09:24:56 +00:00
PHUI.php Remove unused call to phui-text 2016-01-29 12:41:04 -08:00
PHUIActionPanelView.php Add setImage to PHUIActionPanelView 2017-07-30 13:20:26 -07:00
PHUIBadgeBoxView.php PHUIBadgeMiniView 2015-07-10 10:49:28 -07:00
PHUIBadgeMiniView.php Converting badge quality property from color to an integer representation for later sorting purposes 2016-03-30 17:28:34 -07:00
PHUIBadgeView.php Links on badge card should be accessible 2016-04-15 07:55:31 -07:00
PHUIBigInfoView.php Add a UIExamples page for PHUIBigInfoView 2017-08-07 15:58:49 -07:00
PHUIBoxView.php Add basic grey and blue styles for PHUIBoxView 2016-01-21 07:14:39 -08:00
PHUIButtonBarView.php Move simple buttons, bar to own CSS file 2017-06-01 16:52:00 -07:00
PHUIButtonView.php Allow Phriction document edits to be saved as drafts 2018-09-12 13:30:40 -07:00
PHUICMSView.php Rough in Guides Application 2016-08-17 10:14:05 -07:00
PHUIColor.php Replace Differential "unit stars" with icons 2021-03-17 13:45:52 -07:00
PHUICrumbsView.php On Dashboard tab panels in edit mode, make the "Tab Name" and the "Dropdown Edit Caret" into different links 2019-04-12 06:08:32 -07:00
PHUICrumbView.php Allow navigation breadcrumbs to be marked as "always visible" so they show up on phones 2018-05-09 13:21:47 -07:00
PHUICurtainObjectRefListView.php Use the new "CurtainObjectRefList" UI element for subscribers 2020-02-04 12:38:41 -08:00
PHUICurtainObjectRefView.php Provide a simple "Attach File" explicit workflow for files referenced but not attached 2022-05-24 09:49:59 -07:00
PHUIDocumentSummaryView.php Add a Read More link to PHUIDocumentSummaryView 2015-12-19 12:49:23 -08:00
PHUIDocumentView.php Layout Phriction actions without floats, to avoid conflicts with floating content 2018-09-10 11:19:53 -07:00
PHUIFeedStoryView.php Update notification UI a little 2017-08-28 14:52:52 -07:00
PHUIHeaderView.php Remove "stronger/weaker" policy color hints from object headers 2019-11-18 22:05:26 -08:00
PHUIHeadThingView.php Fix specifications of some "Visual Only" elements 2019-02-13 12:26:28 -08:00
PHUIHovercardView.php Render user hovercards with context information about their ability to see the context object 2021-02-13 13:37:37 -08:00
PHUIIconCircleView.php Try layering state icons on PHUICircleIconView 2017-05-26 13:55:42 -07:00
PHUIIconView.php Improve commit action item layout on mobile 2020-08-12 09:04:07 -07:00
PHUIImageMaskView.php Fix AphrontTagView visibility 2015-01-14 06:54:39 +11:00
PHUIInfoView.php Fix PHP 8.1 "strlen(null)" exceptions which block rendering the Dashboard page 2023-05-01 15:45:24 +02:00
PHUIInvisibleCharacterView.php Added initial class for displaying invisible chars 2016-09-12 21:57:01 -04:00
PHUILauncherView.php Move existing "Console" interfaces away from "setFixed(...)" on "TwoColumnView" 2020-02-04 06:52:23 -08:00
PHUILeftRightView.php Rudamentary PHUILeftRightView 2017-07-10 18:19:57 -07:00
PHUILinkView.php Use the new "CurtainObjectRefList" UI element for subscribers 2020-02-04 12:38:41 -08:00
PHUIListItemView.php Roughly style the new "flank" paths UI 2020-04-22 08:31:40 -07:00
PHUIListView.php Make the "Keyboard Shortcuts" dialog in Differential less hideous 2020-04-19 09:01:07 -07:00
PHUIObjectBoxView.php Replace old hard-coded URI-based "changes saved" jank with new overgeneralized cookie-based "changes saved" jank 2020-04-19 09:04:31 -07:00
PHUIObjectItemListView.php Fix numerous PHP 8.1 "strlen(null)" exceptions preventing homepage to display 2023-04-27 14:08:48 +02:00
PHUIObjectItemView.php Fix regression in PHUIObjectItemView.php:662: allow PhutilURI and other stringlike 2023-05-06 15:57:16 +02:00
PHUIPagerView.php Fix a couple more "URI->alter()" callsites in paging code 2019-02-16 07:28:35 -08:00
PHUIPinboardItemView.php Convert all calls to 'IconFont' to just 'Icon' 2016-01-27 20:59:27 -08:00
PHUIPinboardView.php [Redesign] Center Pinboard Items 2015-05-31 14:28:16 -07:00
PHUIPropertyGroupView.php PHUIPropertyListView 2013-10-11 07:53:56 -07:00
PHUIPropertyListView.php Fix deprecated argument order for "implode()" 2019-10-17 09:11:27 -07:00
PHUIRemarkupPreviewPanel.php Rename "PHUIDocumentViewPro" to "PHUIDocumentView" 2018-08-28 14:53:07 -07:00
PHUISegmentBarSegmentView.php Fix PHP 8.1 "strlen(null)" exception on UIExamples' Bars page 2023-06-03 11:50:52 +02:00
PHUISegmentBarView.php First cut of progress bars (PHUISegmentBarView) 2016-02-08 15:28:09 -08:00
PHUIStatusItemView.php When a reviewer can't see a revision, show it clearly in the reviewer list 2021-02-13 13:37:37 -08:00
PHUIStatusListView.php Fix AphrontTagView visibility 2015-01-14 06:54:39 +11:00
PHUITabGroupView.php Make the "Keyboard Shortcuts" dialog in Differential less hideous 2020-04-19 09:01:07 -07:00
PHUITabView.php Make the "Keyboard Shortcuts" dialog in Differential less hideous 2020-04-19 09:01:07 -07:00
PHUITagView.php Fix PHP 8.1 "strlen(null)" exception which blocks rendering the Projects page (and log alien values) 2023-05-01 22:22:48 +02:00
PHUITimelineEventView.php When printing timestamps on paper: use an absolute, context-free date format 2020-09-04 16:36:34 -07:00
PHUITimelineView.php Clean up a couple more URI alter() calls 2019-02-15 14:07:17 -08:00
PHUITwoColumnView.php Fix deprecated argument order for "implode()" 2019-10-17 09:11:27 -07:00
PHUIWorkboardView.php Only prevent drag-scroll in the Y direction on workboards 2016-02-08 10:05:39 -08:00
PHUIWorkpanelView.php Expand scope of addActionItem in PHUIHeaderView 2016-03-04 18:35:05 -08:00