Skip to content

Commit d9b5e88

Browse files
Bugfix: Also catch null in date field controller.
1 parent 7efcc4c commit d9b5e88

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

classes/local/customfield/field/date/wbt_field_controller.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,16 @@ class wbt_field_controller extends field_controller implements wbt_field_control
4141
/**
4242
* Get the actual string value of the customfield.
4343
*
44-
* @param string|array $key
44+
* @param string|array|int|null $key
4545
* @param bool $formatstring
4646
* @param bool $keyisencoded
4747
* @return string the string value
4848
*/
49-
public function get_option_value_by_key(string|array $key, bool $formatstring = true, bool $keyisencoded = false): string {
49+
public function get_option_value_by_key(
50+
string|array|int|null $key,
51+
bool $formatstring = true,
52+
bool $keyisencoded = false
53+
): string {
5054
if (empty($key) || $key == 0) {
5155
return '';
5256
}

0 commit comments

Comments
 (0)