You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The column loop try to access nonexistent column, other driver like MySQL return false, but SQLite driver has a different behavior and throws a PDOException when $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); is set.
I suggest to use columnCount() from PDOStatement to avoid accessing invalid column index.
The column loop try to access nonexistent column, other driver like MySQL return false, but SQLite driver has a different behavior and throws a
PDOException
when$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
is set.I suggest to use
columnCount()
fromPDOStatement
to avoid accessing invalid column index.Sample code:
Because
getColumnMeta
are not supported by all driver it's return must always be checkedI am current using legacy branch it would be great if patches apply on it
The text was updated successfully, but these errors were encountered: