HomePhorge

Validate PhabricatorSearchTextField value not to be an array

Description

Validate PhabricatorSearchTextField value not to be an array

Summary:
PhabricatorSearchTextField.php's parent class PhabricatorSearchField.php defines an (empty) protected function validateControlValue($value).
Override this function in PhabricatorSearchTextField.php by disallowing arrays (as the only data type which cannot be casted into a text value).

Closes T15714

Test Plan: Apply D25518; then manually edit the code in ManiphestTaskSearchEngine.php by defining an array and passing that array to the Page Size text field via id(new PhabricatorSearchTextField())->setDefaultValue($empty_array), then go to /maniphest/query/advanced/ and see the error message.

Reviewers: O1 Blessed Committers, 20after4

Reviewed By: O1 Blessed Committers, 20after4

Subscribers: 20after4, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15714

Differential Revision: https://we.phorge.it/D25519

Details

Provenance
Andre KlapperAuthored on Feb 5 2024, 1:41 PM
themackabuPushed on Mar 25 2025, 8:07 PM
Parents
rP9c9fbc3d0484: unbreak celerity/map
Branches
Unknown
Tags
Unknown

Event Timeline