summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-02-28 13:53:20 +0100
committerAndrey Andreev <narf@bofh.bg>2012-02-28 13:53:20 +0100
commit4f7ea7072281ea8e400a08bda2b67a8b5c5bdf20 (patch)
treea34f9d5b3b0e491ab3c2238162557819d6fcd0f2 /system/libraries
parentd5e6320ea15edfe31155cb3155d4dd91d24e68e1 (diff)
parent0aa8c60ae7eee0122c42ae17d42fd5471a575743 (diff)
Merge upstream branch
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Form_validation.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index edaa9c361..da78696a6 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -689,11 +689,11 @@ class CI_Form_validation {
*
* @param string the field name
* @param string
- * @return void
+ * @return string
*/
public function set_value($field = '', $default = '')
{
- if ( ! isset($this->_field_data[$field]))
+ if ( ! isset($this->_field_data[$field], $this->_field_data[$field]['postdata']))
{
return $default;
}
@@ -722,7 +722,7 @@ class CI_Form_validation {
*/
public function set_select($field = '', $value = '', $default = FALSE)
{
- if ( ! isset($this->_field_data[$field]) OR ! isset($this->_field_data[$field]['postdata']))
+ if ( ! isset($this->_field_data[$field], $this->_field_data[$field]['postdata']))
{
return ($default === TRUE && count($this->_field_data) === 0) ? ' selected="selected"' : '';
}
@@ -757,7 +757,7 @@ class CI_Form_validation {
*/
public function set_radio($field = '', $value = '', $default = FALSE)
{
- if ( ! isset($this->_field_data[$field]) OR ! isset($this->_field_data[$field]['postdata']))
+ if ( ! isset($this->_field_data[$field], $this->_field_data[$field]['postdata']))
{
return ($default === TRUE && count($this->_field_data) === 0) ? ' checked="checked"' : '';
}