Using empty on a function return value (thanks mrvdb)

Source: https://gist.github.com/mrvdb/0b49dd3c580bcfbe1358
This commit is contained in:
Mikael Nordfeldth 2014-07-15 18:15:36 +02:00
parent 0cefab3603
commit 55db74291c

View File

@ -69,7 +69,7 @@ class NewnoticeAction extends FormAction
protected function doPreparation() protected function doPreparation()
{ {
foreach(array('inreplyto') as $opt) { foreach(array('inreplyto') as $opt) {
if (!empty($this->trimmed($opt))) { if ($this->trimmed($opt)) {
$this->formOpts[$opt] = $this->trimmed($opt); $this->formOpts[$opt] = $this->trimmed($opt);
} }
} }