From 73ce58f804e2480b0553f187e0cf36cd74e263ba Mon Sep 17 00:00:00 2001 From: "Thomas A. Hirsch" Date: Wed, 3 Apr 2024 16:51:29 +0200 Subject: [PATCH] Fix(deprecation) Optional parameter declared before required parameter is implicitly treated as a required parameter --- lib/form/sfFormField.class.php | 2 +- lib/form/sfFormFieldSchema.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/form/sfFormField.class.php b/lib/form/sfFormField.class.php index 0d04cd478..e80fd67cd 100644 --- a/lib/form/sfFormField.class.php +++ b/lib/form/sfFormField.class.php @@ -41,7 +41,7 @@ class sfFormField * @param string $value The field value * @param sfValidatorError $error A sfValidatorError instance */ - public function __construct(sfWidgetForm $widget, ?sfFormField $parent = null, $name, $value, ?sfValidatorError $error = null) + public function __construct(sfWidgetForm $widget, ?sfFormField $parent = null, $name = null, $value = null, ?sfValidatorError $error = null) { $this->widget = $widget; $this->parent = $parent; diff --git a/lib/form/sfFormFieldSchema.class.php b/lib/form/sfFormFieldSchema.class.php index e0a93fb48..e0d68ac79 100644 --- a/lib/form/sfFormFieldSchema.class.php +++ b/lib/form/sfFormFieldSchema.class.php @@ -28,7 +28,7 @@ class sfFormFieldSchema extends sfFormField implements ArrayAccess, Iterator, Co * @param string $value The field value * @param sfValidatorError $error A sfValidatorError instance */ - public function __construct(sfWidgetFormSchema $widget, ?sfFormField $parent = null, $name, $value, ?sfValidatorError $error = null) + public function __construct(sfWidgetFormSchema $widget, ?sfFormField $parent = null, $name = null, $value = null, ?sfValidatorError $error = null) { parent::__construct($widget, $parent, $name, $value, $error);