Skip to content

Commit b84b3e9

Browse files
committed
Added stub errorInfo() to prevent upstream issues.
Native PDO code expects constructor called for the method to work and returns `null` under circumstances.
1 parent e65364a commit b84b3e9

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
@@ -601,4 +601,9 @@ private function getExecutedSql(?array $params) : string
601601

602602
return $sql;
603603
}
604+
605+
public function errorInfo(): array
606+
{
607+
return ['00000', 0, 'PHP MySQL Engine: errorInfo() not supported.'];
608+
}
604609
}

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)