Description
Not sure what's wrong, it works in my local dev environment but not in the server. all other DB related function works but not Auth::attempt()
Warning: array_diff() [function.array-diff]: Argument #1 is not an array in .../web/bootstrap/compiled.php line 11346
$user = array(
'username' => 'myuser',
'password' => 'abc'
);
if (Auth::attempt($user)) {
echo "Here I am : " .Auth::user()->id;
}
FYI - I'm running xampp 1.8.1 in windows7 with PHP 5.4.7 and my server is Linux bluejays with PHP 5.3.13
I changed the flash() in bootstrap/compiled.php like this
public function flash($key, $value)
{
$this->put($key, $value);
$this->push('flash.new', $key);
$old = $this->get('flash.old');
$old = (empty($old)) ? array() : $old;
$this->put('flash.old', array_diff($old, array($key)));
}
Then I managed to make it work and get the "Here I am : 1" but it didn't set anything in the session