Page MenuHomestyx hydra

No OneTemporary

diff --git a/src/view/form/control/AphrontFormTextAreaControl.php b/src/view/form/control/AphrontFormTextAreaControl.php
index 311beaea8e..bd36122ee9 100644
--- a/src/view/form/control/AphrontFormTextAreaControl.php
+++ b/src/view/form/control/AphrontFormTextAreaControl.php
@@ -1,78 +1,80 @@
<?php
/**
* @concrete-extensible
*/
class AphrontFormTextAreaControl extends AphrontFormControl {
const HEIGHT_VERY_SHORT = 'very-short';
const HEIGHT_SHORT = 'short';
const HEIGHT_VERY_TALL = 'very-tall';
private $height;
private $readOnly;
private $customClass;
private $placeHolder;
public function setPlaceHolder($place_holder) {
$this->placeHolder = $place_holder;
return $this;
}
private function getPlaceHolder() {
return $this->placeHolder;
}
public function setHeight($height) {
$this->height = $height;
return $this;
}
public function setReadOnly($read_only) {
$this->readOnly = $read_only;
return $this;
}
protected function getReadOnly() {
return $this->readOnly;
}
protected function getCustomControlClass() {
return 'aphront-form-control-textarea';
}
public function setCustomClass($custom_class) {
$this->customClass = $custom_class;
return $this;
}
protected function renderInput() {
$height_class = null;
switch ($this->height) {
case self::HEIGHT_VERY_SHORT:
case self::HEIGHT_SHORT:
case self::HEIGHT_VERY_TALL:
$height_class = 'aphront-textarea-'.$this->height;
break;
}
$classes = array();
$classes[] = $height_class;
$classes[] = $this->customClass;
$classes = trim(implode(' ', $classes));
return phutil_tag(
'textarea',
array(
'name' => $this->getName(),
'disabled' => $this->getDisabled() ? 'disabled' : null,
'readonly' => $this->getReadonly() ? 'readonly' : null,
'class' => $classes,
'style' => $this->getControlStyle(),
'id' => $this->getID(),
'placeholder' => $this->getPlaceHolder(),
),
- $this->getValue());
+ // NOTE: This needs to be string cast, because if we pass `null` the
+ // tag will be self-closed and some browsers aren't thrilled about that.
+ (string)$this->getValue());
}
}

File Metadata

Mime Type
text/x-diff
Expires
Mon, Apr 28, 11:11 AM (1 d, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
107943
Default Alt Text
(2 KB)

Event Timeline