I am getting an Array to String conversion error
errorCode() --> 00000
errorInfo() --> Array
public function getUserInfoByMail( $userEmail )
{
if (is_mail($userEmail))
{
$sql = $this->db->prepare("SELECT * FROM customer INNER JOIN addresses ON customer.customerid = addresses.customerid WHERE standard='1' AND deleted='0' AND email=:email");
if ($sql->execute(array(':email' => $userEmail)))
return $sql->fetch(PDO::FETCH_ASSOC);
else
throw new Exception("There was a DB-Error!");
}
//....
}
Why am I am getting an Array to String conversion error?