summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2026-06-02pdo_firebird: override sysDate and sysTimeStamp from pdo_base defaultsHEADv5.22.11-lscLester Caine1-0/+2
ADODB_pdo_base defaults both to '?' which _UpdatePDO() copies to the parent ADODB_pdo connection. pdo_firebird must declare its own values so DEFTIMESTAMP generates LOCALTIMESTAMP rather than '?'. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02Fix LOCALTIMESTAMP/CURRENT_TIMESTAMP schema default handling for Firebird 4+Lester Caine2-9/+11
CURRENT_TIMESTAMP returns TIMESTAMP WITH TIME ZONE in Firebird 4+, which PHP PDO cannot handle without a valid session timezone, causing SQLSTATE 22009. - adodb-firebird.inc.php: sysTimeStamp changed to LOCALTIMESTAMP so DEFTIMESTAMP generates a timezone-naive default (propagates to pdo_firebird via adodb-pdo.inc.php) - adodb-datadict.inc.php: extend space-padding escape hatch to D/T columns so SQL keywords can be passed through verbatim as DEFAULT values Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-01Restore nameQuote='' for Firebird PDO — prevent quoted lowercase identifiersLester Caine1-0/+1
Without this, adodb DataDict quotes table names causing Firebird to store them as lowercase case-sensitive identifiers instead of the standard unquoted uppercase. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12Add missing functions for firebird pdo driver ?_init neededLester Caine1-2/+14
2026-05-12Tidy niggle with php8.5Lester Caine1-3/+4
2026-05-12Tag private versionLester Caine1-1/+1
2025-11-22Bump version to 5.22.11v5.22.11Damien Regad1-1/+1
2025-11-22Update ChangelogDamien Regad1-0/+18
2025-11-22mysql: treat objects with __toString() as stringDamien Regad1-1/+1
Since the mysqli driver refactoring in 5.22.0 to support bound variable statements, objects passed as parameters are handled as BLOBs. This is a regression compared to earlier behavior, which allowed those having a __toString() method to be treated as strings. This restores the earlier functionality. Fixes #1075
2025-11-22WhitespaceDamien Regad1-4/+4
2025-11-22PR #1074: ActiveRecord doQuote and follow-up fixesDamien Regad2-68/+62
2025-11-22Removed unused _QName() methodDamien Regad1-15/+0
It was replaced by nameQuoter() many years ago, see commit 876d51b73a5efa089e4cb12589de242e4f24b4c2.
2025-11-22Add missing MetaTypes in switchDamien Regad1-0/+7
Some changes made in the standard ADODB_Active_Record class's doQuote() method were never applied to the extended version.
2025-11-22Remove useless strlen() and simplify quote checkDamien Regad2-6/+2
2025-11-22Fix static analysis warningsDamien Regad2-6/+7
2025-11-22Coding guidelinesDamien Regad2-56/+56
2025-11-22Active record: handle empty string in dbquote()Konstantin Tarasov2-3/+8
The method did not generate the appropriate quote for empty strings, resulting in invalid SQL syntax in the UPDATE statement's where clause. Fix #1073, PR #1074
2025-11-22autoExecute return false on update with no matchDamien Regad1-2/+3
If the specified where clause returns no rows, then we return false early, there is no point building and executing an UPDATE statement that will do nothing. Fixes #1148
2025-11-22autoExecute: always use DB_AUTOQUERY_* constantsDamien Regad1-13/+20
2025-11-22PHP 7.0 compatible syntaxDamien Regad1-5/+5
Trailing comma in function calls is only available since PHP 7.3 Named arguments are only allowed since PHP 8.0
2025-11-22Fix autoExecute() skipping updatesDiogo Galvão2-3/+32
AutoExecute fetches a row from the table prior to performing an insert or update. When $forceUpdate is false, only modified columns should be updated. However, the WHERE clause was not being used when fetching the row, so the comparison was always made against an arbitrary row, causing differences to be detected or missed by chance. This change makes use of the $where parameter when fetching the row from the table, making the comparison work as intended. Fixes #1146
2025-10-25PHP 8.5: fix Non-canonical cast deprecationsDamien Regad26-55/+55
Non-canonical cast (integer) is deprecated, use the (int) cast instead Global search and replace throughout the code base. Fixes #1143
2025-09-15PDO Firebird driver extends ADODB_pdo_baseDamien Regad1-1/+1
Previously, it inherited from ADODB_pdo, which caused Fatal error: Uncaught Error: Call to undefined method ADODB_pdo_firebird::_init(). Fixes #1122
2025-09-02.gitignore Python virtual environmentDamien Regad1-0/+3
2025-08-03Bump version to 5.22.10v5.22.10Damien Regad1-1/+1
2025-08-03Update ChangelogDamien Regad1-0/+18
2025-08-03Refactor metaForeignKeys() methodDamien Regad1-19/+17
Use a single, more advanced regex to parse the table SQL, allowing identification of foreign key definitions with a single pass, instead of several preg_split/preg_match calls. The new regex recognizes both column and table constraints, and allows composite keys too. Case conversion (when $upper parameter is true) is performed within the foreach loop that builds the return array, instead of calling array_change_key_case() at the end. Fixes #1078, #1079, #1080
2025-08-03Ignore case when matching FOREIGN keywordDamien Regad1-1/+1
Fixes metaForeignKeys() method returning nothing when FOREIGN keyword was not given in upper case. Fixes #1078
2025-08-03Code cleanupDamien Regad1-74/+54
- Fix static analysis warnings - Remove useless code - Coding guidelines
2025-08-03Execute PRAGMA to retrieve PK after getting table infoDamien Regad1-25/+7
2025-08-03Remove unnecessary where clauseDamien Regad1-2/+1
According to SQLite schema documentation, the only valid values for *type* are 'table', 'index', 'view', or 'trigger' [1] so testing for `type != 'meta'` is useless. [1]: https://sqlite.org/schematab.html#interpretation_of_the_schema_table
2025-08-03Remove unnecessary subquery in metaForeignKeys()Damien Regad1-4/+1
2025-08-03Prevent SQL injection in sqlite3 driverDamien Regad1-22/+15
Use query parameters instead of injecting the table name in the SQL, in the following methods: - metaColumns() - metaForeignKeys() - metaIndexes() Thanks to Marco Nappi (@mrcnpp) for reporting this vulnerability. Fixes #1083, CVE-2025-54119, GHSA-vf2r-cxg9-p7rf
2025-05-01Bump version to 5.22.9v5.22.9Damien Regad2-3/+3
2025-05-01Mark pg_insert_id() as deprecatedDamien Regad1-0/+1
This function does the same thing as ADODB_postgres8::_insertID(), in a more limited way. There is no reason to keep it around. Fixes #1069
2025-05-01PHPDocDamien Regad1-2/+10
2025-05-01Merge branch 'sec-pgsql-sql-injection' into hotfix/5.22Damien Regad2-1/+7
Advisory https://github.com/ADOdb/ADOdb/security/advisories/GHSA-8x27-jwjr-8545 Fixes #1070
2025-05-01Update changelogDamien Regad1-0/+5
2025-05-01Fix SQL injection in pg_insert_id()Damien Regad1-1/+2
Properly escape the $tablename and $fieldname parameters used to build the sequence name.
2025-04-26Active record: Fix PHP 8.2 deprecation warningDamien Regad3-0/+4
Creation of dynamic property MyClass::$column is deprecated in .../adodb/adodb-active-record.inc.php on line 115 Creation of dynamic property MyClass::$column is deprecated in .../adodb/adodb-active-recordx.inc.php on line 119 Fixes #1068
2025-03-23Fulfill SQLite PRIMARY KEY AUTOINCREMENT requirementsDamien Regad14-17/+36
- Extend _CreateSuffix() with two additional parameters. - Adjust _createSuffix function name. - Add PHPDoc block - Fix spaces Fixes #1055 Signed-off-by: Damien Regad <dregad@mantisbt.org> Changes from PR: - Original commits squashed - Removed space after `&` for byref params - Updated Changelog
2025-03-22Update changelogDamien Regad1-0/+6
2025-03-22Fix SQLite error reportingraspopov1-7/+13
Without debug flag, the library returns '0' instead of error messages and correct SQLite error codes. Fixes #1061, PR #1062
2025-03-22Bump version to 5.22.9-devDamien Regad2-1/+4
2025-01-25Bump version to 5.22.8v5.22.8Damien Regad2-3/+3
2025-01-25Update ChangelogDamien Regad1-5/+23
2025-01-25mysqli: Improve setConnectionParameterlook-was-here1-8/+60
- Simplify control statements with single if expressions. - Updated phpdoc with additional details on how to set connection property values. - Removed to-do that seemed wrong since the user should use setConnectionParameter for those or set the property directly. - Allow setting of ssl cert property values, clientFlags, port, and socket using the standard setConnectionParameter functionality. Feedback updates: - Return false for special cases with type checks on sslsert, socket, clientflags, or port fail - Added invalid connection param to output. - Simplified isset checks. - Changed sslcert to ssl and simplified subkeys to ('key', 'cert', 'ca', 'capath', 'cipher'). - Removed code duplication. - is_numeric should be checking value not parameter Fixes #1044
2025-01-25mysql: SSL not working due to wrong socket/flagslook-was-here1-2/+7
- Remove inappropriate setting of socket. - Updated to use appropriate bitwise operations to check for set SSL client flags and update the default to not overwrite set user flags. - Add friendly error to let user know they need to add a SSL client flag when using certificates. Fixes #919, #1043 Signed-off-by: Damien Regad <dregad@mantisbt.org>
2025-01-25Fix PHP 8.1 deprecation warningsJ.Mourgues1-4/+4
In toexport.inc.php: - trim(): Passing null to parameter of type string is deprecated Fixes #1045 Signed-off-by: Damien Regad <dregad@mantisbt.org>
2025-01-25pgsql: fix serverInfo() version numberDamien Regad1-6/+5
In ADOdb versions < 5.21.0-beta.1, serverInfo()['version'] returned just the version number (e.g. `15.10`), which was extracted from the version string using ADOConnection::_findVers(). Commit f2b88e063d61b12a1df9090b8d0c68831ed0f447 removed the _findVers() call, so serverInfo() could potentially return additional information depending on the actual value returned by pg_version() (e.g. `15.10 (Debian 15.10-0+deb12u1)`. This could cause subsequent version comparisons to fail, e.g. in metaTables(). Fixes #1059