From 928a675529d52e15e7f98cde6239ade7005ffd25 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Tue, 9 Dec 2008 12:25:48 -0500 Subject: [PATCH] Existence checking, avoid warnings --- framework/Controller/lib/Horde/Controller/Base.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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')) { -- 2.11.0