Skip to content

Commit 7f4be9b

Browse files
TybazethePanz
authored andcommitted
Fix PHP8.1 sfForm - Unsupported operand types: array + null on sfForm::updateValues()
Avoid error: Fatal error: Uncaught TypeError: Unsupported operand types: array + null in lib\form\sfForm.class.php:319 Step to reproduce : $form = new sfForm(); $form->updateValues(array('foo' => 'value')); PHP 5.3 coding style May use sfForm::getValues(), but as sfForm::updateValues() is a hack, it could be used before bind ($this->isBound = true);
1 parent 1446798 commit 7f4be9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/form/sfForm.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class sfForm implements ArrayAccess, Iterator, Countable
4747
protected $isBound = false;
4848
protected $taintedValues = array();
4949
protected $taintedFiles = array();
50-
protected $values;
50+
protected $values = array();
5151
protected $defaults = array();
5252
protected $fieldNames = array();
5353
protected $options = array();

0 commit comments

Comments
 (0)