summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-01-06 10:25:46 +0100
committerAndrey Andreev <narf@devilix.net>2014-01-06 10:25:46 +0100
commita4712f562c27cdb2f2fcb15b37731e948f57276a (patch)
tree5cb6c45c5521ab93c2d18b4e9335309ec7a74220
parent8f5420b5c59cb50dfb4834a3ab9a5bee5faadb1c (diff)
Make CI_Form_validation::error()'s first parameter mandatory and add a typehint for CI_Form_validation::error()
-rw-r--r--system/libraries/Form_validation.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index 5ea2f81af..c02abbbcb 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -248,9 +248,9 @@ class CI_Form_validation {
* @param array $data
* @return void
*/
- public function set_data($data = '')
+ public function set_data(array $data)
{
- if ( ! empty($data) && is_array($data))
+ if ( ! empty($data))
{
$this->validation_data = $data;
}
@@ -304,12 +304,12 @@ class CI_Form_validation {
*
* Gets the error message associated with a particular field
*
- * @param string the field name
- * @param string the html start tag
- * @param strign the html end tag
+ * @param string $field Field name
+ * @param string $prefix HTML start tag
+ * @param strign $suffix HTML end tag
* @return string
*/
- public function error($field = '', $prefix = '', $suffix = '')
+ public function error($field, $prefix = '', $suffix = '')
{
if (empty($this->_field_data[$field]['error']))
{