Skip to content
This repository has been archived by the owner on Apr 8, 2023. It is now read-only.

Commit

Permalink
Fox PDO::FETCH_CLASS
Browse files Browse the repository at this point in the history
  • Loading branch information
erickmcarvalho committed Sep 26, 2014
1 parent 6951c8f commit 58a7167
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions src/LikePDO/Instances/LikePDOStatement.php
Original file line number Diff line number Diff line change
Expand Up @@ -927,25 +927,23 @@ public function fetchAll($fetch_style = NULL, $cursor_orientation = LikePDO::FET
}
else
{
if($this->fetchMode != LikePDO::FETCH_CLASS)
if($this->fetchMode == LikePDO::FETCH_CLASS)
{
throw new LikePDOException("No fetch class specified");
return false;
}
elseif(!$this->fetchModeDefinition)
{
throw new LikePDOException("No fetch class specified");
return false;
}
elseif(!class_exists($this->fetchModeDefinition))
{
throw new LikePDOException("No fetch class specified");
return false;
if(!$this->fetchModeDefinition)
{
throw new LikePDOException("No fetch class specified");
return false;
}
else
{
$class = $this->fetchModeDefinition;
$arguments = $this->fetchModeArguments;
}
}
else
{
$class = $this->fetchModeDefinition;
$arguments = $this->fetchModeArguments;
$class = "stdClass";
$arguments = array();
}
}

Expand Down

0 comments on commit 58a7167

Please sign in to comment.