Skip to content

Commit b27b3d4

Browse files
thirschthePanz
authored andcommitted
Fix(deprecation) Optional parameter declared before required parameter is implicitly treated as a required parameter
1 parent caf01e2 commit b27b3d4

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

lib/form/sfFormField.class.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ class sfFormField
3535
/**
3636
* Constructor.
3737
*
38-
* @param sfWidgetForm $widget A sfWidget instance
39-
* @param sfFormField $parent The sfFormField parent instance (null for the root widget)
40-
* @param string $name The field name
41-
* @param string $value The field value
42-
* @param sfValidatorError $error A sfValidatorError instance
38+
* @param sfWidgetForm $widget A sfWidget instance
39+
* @param sfFormField|null $parent The sfFormField parent instance (null for the root widget)
40+
* @param string $name The field name
41+
* @param mixed $value The field value
42+
* @param sfValidatorError|null $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 = '', $value = null, ?sfValidatorError $error = null)
4545
{
4646
$this->widget = $widget;
4747
$this->parent = $parent;

lib/form/sfFormFieldSchema.class.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ class sfFormFieldSchema extends sfFormField implements ArrayAccess, Iterator, Co
2222
/**
2323
* Constructor.
2424
*
25-
* @param sfWidgetFormSchema $widget A sfWidget instance
26-
* @param sfFormField $parent The sfFormField parent instance (null for the root widget)
27-
* @param string $name The field name
28-
* @param string $value The field value
29-
* @param sfValidatorError $error A sfValidatorError instance
25+
* @param sfWidgetFormSchema $widget A sfWidget instance
26+
* @param sfFormField|null $parent The sfFormField parent instance (null for the root widget)
27+
* @param string $name The field name
28+
* @param mixed $value The field value
29+
* @param sfValidatorError|null $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 = '', $value = null, ?sfValidatorError $error = null)
3232
{
3333
parent::__construct($widget, $parent, $name, $value, $error);
3434

0 commit comments

Comments
 (0)