From: Michael J. Rubinsky Date: Tue, 9 Dec 2008 17:25:48 +0000 (-0500) Subject: Existence checking, avoid warnings X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=928a675529d52e15e7f98cde6239ade7005ffd25;p=horde.git Existence checking, avoid warnings --- diff --git a/framework/Controller/lib/Horde/Controller/Base.php b/framework/Controller/lib/Horde/Controller/Base.php index d56a4d61c..4ca88e4d5 100644 --- a/framework/Controller/lib/Horde/Controller/Base.php +++ b/framework/Controller/lib/Horde/Controller/Base.php @@ -191,23 +191,23 @@ abstract class Horde_Controller_Base // validate options // set response status - if ($status = $options['status']) { + if ($status = !empty($options['status']) ? $options['status'] : null) { $header = $this->interpretStatus($status); $this->_response->setStatus($header); } // set response location - if ($location = $options['location']) { + if ($location = !empty($options['location']) ? $options['location'] : null) { $url = $this->urlFor($location); - $this->_response->setHeader("Location: $url", $replace=true); + $this->_response->setHeader("Location: $url", $replace = true); } // render text - if ($text = $options['text']) { + if ($text = !empty($options['text']) ? $options['text'] : null) { $this->renderText($text); // render xml - } elseif ($xml = $options['xml']) { + } elseif ($xml = !empty($options['xml']) ? $options['xml'] : null) { $this->_response->setContentType('application/xml'); if (is_object($xml) && method_exists($xml, 'toXml')) {