Skip to content

Instantly share code, notes, and snippets.

@kiall
Created September 20, 2011 01:06
Show Gist options
  • Save kiall/1228059 to your computer and use it in GitHub Desktop.
Save kiall/1228059 to your computer and use it in GitHub Desktop.
diff --git a/classes/kohana/orm/validation/exception.php b/classes/kohana/orm/validation/exception.php
index 6e0bfd9..67b3fe3 100644
--- a/classes/kohana/orm/validation/exception.php
+++ b/classes/kohana/orm/validation/exception.php
@@ -150,7 +150,7 @@ class Kohana_ORM_Validation_Exception extends Kohana_Exception {
{
if (is_array($object))
{
- $errors[$key] = $this->generate_errors($key, $object, $directory, $translate);
+ $errors[$key] = $this->generate_errors($alias.DIRECTORY_SEPARATOR.$key, $object, $directory, $translate);
}
elseif ($object instanceof Validation)
{
@@ -161,7 +161,7 @@ class Kohana_ORM_Validation_Exception extends Kohana_Exception {
}
else
{
- $file = trim($directory.'/'.$alias, '/');
+ $file = trim($directory.DIRECTORY_SEPARATOR.$alias, DIRECTORY_SEPARATOR);
}
// Merge in this array of errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment