Index: library/Zend/Controller/Action.php =================================================================== --- library/Zend/Controller/Action.php (revision 22458) +++ library/Zend/Controller/Action.php (working copy) @@ -580,7 +580,7 @@ protected function _getParam($paramName, $default = null) { $value = $this->getRequest()->getParam($paramName); - if ((null === $value) && (null !== $default)) { + if ((null === $value || '' === $value) && (null !== $default)) { $value = $default; } Index: tests/Zend/Controller/ActionTest.php =================================================================== --- tests/Zend/Controller/ActionTest.php (revision 22458) +++ tests/Zend/Controller/ActionTest.php (working copy) @@ -245,6 +245,15 @@ $this->assertEquals(0, $this->_controller->getParam('bar', -1)); $this->assertEquals(-1, $this->_controller->getParam('baz', -1)); } + + /** + * @group ZF-9179 + */ + public function testGetParamForEmptyString() + { + $this->_controller->setParam('lang', ''); + $this->assertEquals('en', $this->_controller->getParam('lang', 'en')); + } public function testGetParams() {