mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-07 05:11:05 +01:00
226f315093
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, however use `phutil_nonempty_scalar()` as the value might not necessarily be a string object. Note: this may highlight other absurd input values that might be worth correcting instead of just ignoring. If phutil_nonempty_scalar() 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=788098096e11), phorge(head=arcpatch-D25239, ref.master=840a7fab2bc8, ref.arcpatch-D25239=870d62ce0ed9) #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldInt.php:36] ``` Closes T15581 Test Plan: Page `Create Blueprint` at `/drydock/blueprint/edit/form/default/` renders as expected in web browser. Try also creating a custom integer field and put some fuzzy data. https://we.phorge.it/book/phorge/article/custom_fields/ Test these values: - 1 (stays as-is) - 0 (stays as-is) - 123.45 (becomes 123) - a "lizard" (becomes zero) - empty ("") (becomes empty) Reviewers: O1 Blessed Committers, valerio.bozzolan Reviewed By: O1 Blessed Committers, valerio.bozzolan Subscribers: speck, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Maniphest Tasks: T15581 Differential Revision: https://we.phorge.it/D25371 |
||
---|---|---|
.. | ||
cache | ||
cluster | ||
contentsource | ||
customfield | ||
daemon | ||
diff | ||
edges | ||
editor | ||
env | ||
events | ||
export | ||
graph | ||
internationalization | ||
javelin | ||
lint/linter | ||
lipsum | ||
log | ||
management | ||
markup | ||
parser | ||
query | ||
ssh | ||
status | ||
storage | ||
syntax | ||
testing | ||
time | ||
util | ||
PhabricatorEditor.php |