Skip to content

Commit cdf828c

Browse files
committed
Container::addTextArea() only parameter $cols is deprecated
1 parent 23be8ee commit cdf828c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Forms/Container.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,11 +269,11 @@ public function addPassword($name, $label = NULL, $cols = NULL, $maxLength = NUL
269269
public function addTextArea($name, $label = NULL, $cols = NULL, $rows = NULL)
270270
{
271271
$control = new Controls\TextArea($label);
272-
if ($cols || $rows) {
273-
trigger_error(__METHOD__ . '() parameters $cols and $rows are deprecated, use setAttribute(...).', E_USER_DEPRECATED);
274-
$control->setAttribute('cols', $cols)->setAttribute('rows', $rows);
272+
if ($cols) {
273+
trigger_error(__METHOD__ . '() parameters $cols is deprecated, use setAttribute("cols", ...).', E_USER_DEPRECATED);
274+
$control->setAttribute('cols', $cols);
275275
}
276-
return $this[$name] = $control;
276+
return $this[$name] = $control->setAttribute('rows', $rows);
277277
}
278278

279279

0 commit comments

Comments
 (0)