Skip to content

Commit 0fcd589

Browse files
committed
Update mzur/kirby-form
1 parent 5b06931 commit 0fcd589

4 files changed

Lines changed: 17 additions & 14 deletions

File tree

vendor/composer/installed.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,17 +112,17 @@
112112
},
113113
{
114114
"name": "mzur/kirby-form",
115-
"version": "v3.2.0",
116-
"version_normalized": "3.2.0.0",
115+
"version": "v3.3.0",
116+
"version_normalized": "3.3.0.0",
117117
"source": {
118118
"type": "git",
119119
"url": "https://github.com/mzur/kirby-form.git",
120-
"reference": "3d660edbb892c72ffcc36ed81f0ae962176283c2"
120+
"reference": "8dc211b321375dbf77c43e1287e9fe0be2762ec0"
121121
},
122122
"dist": {
123123
"type": "zip",
124-
"url": "https://api.github.com/repos/mzur/kirby-form/zipball/3d660edbb892c72ffcc36ed81f0ae962176283c2",
125-
"reference": "3d660edbb892c72ffcc36ed81f0ae962176283c2",
124+
"url": "https://api.github.com/repos/mzur/kirby-form/zipball/8dc211b321375dbf77c43e1287e9fe0be2762ec0",
125+
"reference": "8dc211b321375dbf77c43e1287e9fe0be2762ec0",
126126
"shasum": ""
127127
},
128128
"require": {
@@ -134,7 +134,7 @@
134134
"mzur/kirby-defuse-session": "^1.0",
135135
"phpunit/phpunit": "^9.0"
136136
},
137-
"time": "2022-11-18T09:26:06+00:00",
137+
"time": "2023-02-19T09:51:38+00:00",
138138
"type": "kirby-plugin",
139139
"installation-source": "dist",
140140
"autoload": {
@@ -166,7 +166,7 @@
166166
],
167167
"support": {
168168
"issues": "https://github.com/mzur/kirby-form/issues",
169-
"source": "https://github.com/mzur/kirby-form/tree/v3.2.0"
169+
"source": "https://github.com/mzur/kirby-form/tree/v3.3.0"
170170
},
171171
"install-path": "../mzur/kirby-form"
172172
}

vendor/composer/installed.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
'type' => 'kirby-plugin',
66
'install_path' => __DIR__ . '/../../',
77
'aliases' => array(),
8-
'reference' => '27ebefe518469dc8eae5557b223778e503b81df2',
8+
'reference' => '5b06931dbc68f9c10aef988d927bdc55a8c87390',
99
'name' => 'mzur/kirby-uniform',
1010
'dev' => false,
1111
),
@@ -29,12 +29,12 @@
2929
'dev_requirement' => false,
3030
),
3131
'mzur/kirby-form' => array(
32-
'pretty_version' => 'v3.2.0',
33-
'version' => '3.2.0.0',
32+
'pretty_version' => 'v3.3.0',
33+
'version' => '3.3.0.0',
3434
'type' => 'kirby-plugin',
3535
'install_path' => __DIR__ . '/../mzur/kirby-form',
3636
'aliases' => array(),
37-
'reference' => '3d660edbb892c72ffcc36ed81f0ae962176283c2',
37+
'reference' => '8dc211b321375dbf77c43e1287e9fe0be2762ec0',
3838
'dev_requirement' => false,
3939
),
4040
'mzur/kirby-uniform' => array(
@@ -43,7 +43,7 @@
4343
'type' => 'kirby-plugin',
4444
'install_path' => __DIR__ . '/../../',
4545
'aliases' => array(),
46-
'reference' => '27ebefe518469dc8eae5557b223778e503b81df2',
46+
'reference' => '5b06931dbc68f9c10aef988d927bdc55a8c87390',
4747
'dev_requirement' => false,
4848
),
4949
),

vendor/mzur/kirby-form/src/Form.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,14 @@ public function data($key = '', $value = '', $escape = true)
140140
* Get the data that was flashed to the session
141141
*
142142
* @param string $key
143+
* @param mixed $default
143144
* @return mixed
144145
*/
145-
public function old($key)
146+
public function old($key, $default = '')
146147
{
147148
$data = $this->flash->get(self::FLASH_KEY_DATA, []);
148149

149-
return isset($data[$key]) ? $this->encodeField($data[$key]) : '';
150+
return isset($data[$key]) ? $this->encodeField($data[$key]) : $default;
150151
}
151152

152153
/**

vendor/mzur/kirby-form/tests/FormTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ public function testOld()
4040
$_POST['test'] = '<value>';
4141
$form = new Form(['test' => ['rules' => ['num']]]);
4242
$this->assertEmpty($form->old('test'));
43+
$this->assertEquals(null, $form->old('test', null));
44+
$this->assertEquals(0, $form->old('test', 0));
4345
$form->validates();
4446
$this->assertEquals('&lt;value&gt;', $form->old('test'));
4547
}

0 commit comments

Comments
 (0)