Skip to content

Commit 02332db

Browse files
committed
Fix(deprecation) Optional parameter declared before required parameter is implicitly treated as a required parameter
1 parent 0c9ba11 commit 02332db

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: lib/form/sfFormField.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class sfFormField
4141
* @param string $value The field value
4242
* @param sfValidatorError $error A sfValidatorError instance
4343
*/
44-
public function __construct(sfWidgetForm $widget, ?sfFormField $parent = null, $name, $value, ?sfValidatorError $error = null)
44+
public function __construct(sfWidgetForm $widget, ?sfFormField $parent = null, $name = null, $value = null, ?sfValidatorError $error = null)
4545
{
4646
$this->widget = $widget;
4747
$this->parent = $parent;

Diff for: lib/form/sfFormFieldSchema.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class sfFormFieldSchema extends sfFormField implements ArrayAccess, Iterator, Co
2828
* @param string $value The field value
2929
* @param sfValidatorError $error A sfValidatorError instance
3030
*/
31-
public function __construct(sfWidgetFormSchema $widget, ?sfFormField $parent = null, $name, $value, ?sfValidatorError $error = null)
31+
public function __construct(sfWidgetFormSchema $widget, ?sfFormField $parent = null, $name = null, $value = null, ?sfValidatorError $error = null)
3232
{
3333
parent::__construct($widget, $parent, $name, $value, $error);
3434

0 commit comments

Comments
 (0)