Skip to content

Commit 8e93cb6

Browse files
committed
Update exec to return correct values
1 parent fd1c1d9 commit 8e93cb6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/FakePdo.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public function rollback()
129129

130130
/**
131131
* @param string $statement
132-
* @return bool
132+
* @return int|false
133133
*/
134134
public function exec($statement)
135135
{
@@ -139,7 +139,10 @@ public function exec($statement)
139139
}
140140

141141
$sth = $this->prepare($statement);
142-
return $sth->execute();
142+
if ($sth->execute()){
143+
return $sth->rowCount();
144+
}
145+
return false;
143146
}
144147

145148
/**

0 commit comments

Comments
 (0)