Commit d69867f
committed
Fix broken error handling in sqlite_make_db_sqlite()
The catch block accessed $err->errorInfo[1] and $err->errorInfo[2],
but WP_SQLite_Driver_Exception (which extends PDOException) never sets
the errorInfo property — it is only populated by PHP's internal PDO C
code, not when constructing PDOException subclasses in userland.
This caused PHP warnings and a blank error message on installation
failures. Use $err->getMessage() instead, which is always available,
and remove the unused $err_code variable.
Made-with: Cursor1 parent 1437789 commit d69867f
1 file changed
Lines changed: 1 addition & 3 deletions
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
57 | 55 | | |
58 | 56 | | |
59 | 57 | | |
60 | 58 | | |
61 | 59 | | |
62 | | - | |
| 60 | + | |
63 | 61 | | |
64 | 62 | | |
65 | 63 | | |
| |||
0 commit comments