Skip to content

Commit

Permalink
Refactored the value function to return the value even if a mesh fiel…
Browse files Browse the repository at this point in the history
…d is not defined
  • Loading branch information
sultano committed Sep 13, 2010
1 parent 533e9f8 commit c64d7fb
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions classes/mesh/core.php
Expand Up @@ -144,10 +144,13 @@ public function value($name, $value = NULL)
// return the clean value (if available)
$return_value = $field->value();
}
else
{
$return_value = $this[$name];
}
}

// return the dirty (pre-validation) value if the
// field is not found or if validation has falied
if(empty($return_value))
{
$return_value = $this[$name];
}
}
// setter
Expand Down

0 comments on commit c64d7fb

Please sign in to comment.