Skip to content

Commit 3d9aea2

Browse files
J9remmrflos
authored andcommitted
fix(BazarFields): return "" instead of null when renderring
1 parent 7706ad4 commit 3d9aea2

30 files changed

+41
-41
lines changed

tools/bazar/fields/AclField.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function __construct(array $values, ContainerInterface $services)
3131

3232
protected function renderInput($entry)
3333
{
34-
return null;
34+
return "";
3535
}
3636

3737
public function formatValuesBeforeSave($entry)
@@ -51,7 +51,7 @@ public function formatValuesBeforeSave($entry)
5151

5252
protected function renderStatic($entry)
5353
{
54-
return null;
54+
return "";
5555
}
5656

5757
private function replaceWithCreator($right, $entry)

tools/bazar/fields/CalcField.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ public function __construct(array $values, ContainerInterface $services)
3232
protected function renderInput($entry)
3333
{
3434
// display nothing
35-
return null;
35+
return "";
3636
}
3737

3838
protected function renderStatic($entry)
3939
{
4040
$value = $this->getValue($entry);
4141
if (!in_array($value, [0,"0"], true) && empty($value)) {
4242
// 0 should be displayed but not false or null or ""
43-
return null;
43+
return "";
4444
}
4545
return $this->render("@bazar/fields/text.twig", [
4646
'value' => str_replace('{value}', strval($value), $this->displayText)

tools/bazar/fields/DateField.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ protected function renderStatic($entry)
5959
{
6060
$value = $this->getValue($entry);
6161
if (!$value) {
62-
return null;
62+
return "";
6363
}
6464

6565
if (strlen($value) > 10) {

tools/bazar/fields/EmailField.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ protected function renderStatic($entry)
4747
{
4848
$value = $this->getValue($entry);
4949
if (!$value) {
50-
return null;
50+
return "";
5151
}
5252

5353
// TODO add JS libraries with Twig

tools/bazar/fields/ExternalCheckboxEntryField.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ public function __construct(array $values, ContainerInterface $services)
2424

2525
protected function renderInput($entry)
2626
{
27-
return null;
27+
return "";
2828
}
2929

3030
public function formatValuesBeforeSave($entry)
3131
{
32-
return null;
32+
return "";
3333
}
3434

3535
protected function renderStatic($entry)

tools/bazar/fields/ExternalCheckboxListField.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function __construct(array $values, ContainerInterface $services)
2424

2525
protected function renderInput($entry)
2626
{
27-
return null;
27+
return "";
2828
}
2929

3030
public function formatValuesBeforeSave($entry)

tools/bazar/fields/ExternalFileField.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function __construct(array $values, ContainerInterface $services)
2424

2525
protected function renderInput($entry)
2626
{
27-
return null;
27+
return "";
2828
}
2929

3030
public function formatValuesBeforeSave($entry)
@@ -44,6 +44,6 @@ protected function renderStatic($entry)
4444
]);
4545
}
4646

47-
return null;
47+
return "";
4848
}
4949
}

tools/bazar/fields/ExternalImageField.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function __construct(array $values, ContainerInterface $services)
2424

2525
protected function renderInput($entry)
2626
{
27-
return null;
27+
return "";
2828
}
2929

3030
public function formatValuesBeforeSave($entry)
@@ -51,6 +51,6 @@ protected function renderStatic($entry)
5151
]);
5252
}
5353

54-
return null;
54+
return "";
5555
}
5656
}

tools/bazar/fields/ExternalRadioEntryField.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function __construct(array $values, ContainerInterface $services)
2424

2525
protected function renderInput($entry)
2626
{
27-
return null;
27+
return "";
2828
}
2929

3030
public function formatValuesBeforeSave($entry)

tools/bazar/fields/ExternalRadioListField.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function __construct(array $values, ContainerInterface $services)
2424

2525
protected function renderInput($entry)
2626
{
27-
return null;
27+
return "";
2828
}
2929

3030
public function formatValuesBeforeSave($entry)

0 commit comments

Comments
 (0)