Commit ff94d166 authored by Taylor Otwell's avatar Taylor Otwell

Merge branch 'staging' of github.com:laravel/laravel into staging

parents 51f5fdd0 b7ac6674
......@@ -65,7 +65,10 @@ class Belongs_To extends Relationship {
// are looking for the parent of a child model in this relationship.
foreach ($results as $result)
{
$keys[] = $result->{$this->foreign_key()};
if ( ! is_null($key = $result->{$this->foreign_key()}))
{
$keys[] = $key;
}
}
$this->table->where_in($this->model->key(), array_unique($keys));
......
......@@ -26,6 +26,17 @@ function __($key, $replacements = array(), $language = null)
return Laravel\Lang::line($key, $replacements, $language);
}
/**
* Dump the given value and kill the script.
*
* @param mixed $value
* @return void
*/
function dd($value)
{
die(var_dump($value));
}
/**
* Get an item from an array using "dot" notation.
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment