Skip to content

Commit bf91226

Browse files
authored
Merge pull request #22 from Rarst/stub-errorinfo
Stub errorInfo() to prevent upstream issues
2 parents 6b43422 + b84b3e9 commit bf91226

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/FakePdoStatementTrait.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,4 +631,9 @@ private function getExecutedSql(?array $params) : string
631631

632632
return $sql;
633633
}
634+
635+
public function errorInfo(): array
636+
{
637+
return ['00000', 0, 'PHP MySQL Engine: errorInfo() not supported.'];
638+
}
634639
}

src/FakePdoTrait.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,4 +212,9 @@ public function quote($string, $parameter_type = \PDO::PARAM_STR)
212212

213213
return "{$quotes[0]}{$quoted}{$quotes[1]}";
214214
}
215+
216+
public function errorInfo(): array
217+
{
218+
return ['00000', 0, 'PHP MySQL Engine: errorInfo() not supported.'];
219+
}
215220
}

0 commit comments

Comments
 (0)