@@ -90,11 +90,7 @@ public function getObject() {
90
90
* @return self
91
91
*/
92
92
public function setHref ($ href ) {
93
-
94
- // We have not a very clear idea about what this method should receive
95
- // So, let's log alien stuff for some time
96
- // https://we.phorge.it/T15316
97
- self ::requireValidHref ($ href , 'href ' );
93
+ PhutilURI::checkHrefType ($ href );
98
94
99
95
$ this ->href = $ href ;
100
96
return $ this ;
@@ -161,11 +157,7 @@ public function setImageURI($image_uri) {
161
157
* @return self
162
158
*/
163
159
public function setImageHref ($ image_href ) {
164
-
165
- // We have not a very clear idea about what this method should receive
166
- // So, let's log alien stuff for some time
167
- // https://we.phorge.it/T15316
168
- self ::requireValidHref ($ image_href , 'image_href ' );
160
+ PhutilURI::checkHrefType ($ image_href );
169
161
170
162
$ this ->imageHref = $ image_href ;
171
163
return $ this ;
@@ -929,30 +921,4 @@ private function renderHandleIcon(PhabricatorObjectHandle $handle, $label) {
929
921
return javelin_tag ('span ' , $ options , '' );
930
922
}
931
923
932
-
933
- /**
934
- * Receive a href attribute and check if it has expected values
935
- *
936
- * TODO: Feel free to remove after 2023, if no more new reports arrive.
937
- *
938
- * https://we.phorge.it/T15316
939
- *
940
- * @param mixed $href Value to be checked
941
- * @param string $variable_name Human reference
942
- */
943
- private static function requireValidHref ($ href , $ variable_name ) {
944
-
945
- // We have not a very clear idea about what a "href" should be
946
- if (is_object ($ href ) && !($ href instanceof PhutilURI)) {
947
-
948
- // We log stuff with a kind stack trace
949
- phlog (new Exception (pht (
950
- 'The variable %s received an unexpected type: %s. ' .
951
- 'Please share this stack trace as comment in Task %s ' ,
952
- $ variable_name ,
953
- get_class ($ href ),
954
- 'https://we.phorge.it/T15316 ' )));
955
- }
956
- }
957
-
958
924
}
0 commit comments