| Age | Commit message (Collapse) | Author | Files | Lines |
|
Fixes #848
|
|
Insert_id() attempts to force the return value to an integer data type
which fails if the value is out of range.
Fixes #853
|
|
|
|
If errorMsg() is called after closing the MySQL connection (with
mysqli_close()), the method will throw a PHP warning:
Uncaught Error: mysqli object is already closed.
With PHP < 8.0 the warning won't be thrown due to the @ operator, but
the function will return false; with PHP 8.0 or later, this is a fatal
error (exception).
Remove unnecessary @ operator.
Fixes #842
|
|
MySQL 8 returns an object even if the client connection fails. This
causes ADOConnection_mysqli::errorMsg(), which expects the connection
object to be empty if there is no connection, to throw an error.
Fixes #842
|
|
The fix for issue #806 introduced a regression causing all bound SQL
statements to fail in the mysqli driver, when using alphanumeric
placeholders.
To fix the problem, we ensure that bind array passed to mysqli bind
function is numeric.
Fixes #838
Signed-off-by: Damien Regad <dregad@mantisbt.org>
Changes to original commit: fixed coding guidelines, improved message.
|
|
Fixes #840
|
|
Also remove redundant assignment of $this->_connectionID, which is
already set to false in ADOConnection::close().
Fixes #835
|
|
Prevents occurrence of PHP notice:
Automatic conversion of false to array is deprecated in PHP 8.1
Fixes #829
(cherry picked from commit 40c3ed6d12354f7a83d40cd18f7bc4983dbbd33b)
|
|
Affected_Rows() always returns false on PHP 8.1, because the
'pgsql result' resource has been replaced by the PgSql\Result class [1].
Changes to original contribution:
* Adjust PHPDoc for ADODB_postgres64::$_resultid
* Fix one more occurrence in the postgres7 driver
Fixes #833
[1]: https://www.php.net/manual/en/class.pgsql-result.php
Co-authored-by: Damien Regad <dregad@mantisbt.org>
(cherry picked from commit e3287d6be5545634a6ccbf868919028991a68791)
|
|
Fixes #832
|
|
When an update or insert query is executed after a select query,
ADODB_mysqli::$isSelectStatement is not reset causing subsequent calls
to affected_rows() to return false instead of the expected number of
rows.
This was marked as fixed in 5.22.1 [1], but in fact it wasn't so the
Changelog has been updated accordingly.
Fixes #820
[1]: see commit aa88f92f95454fdfda3c4a916f7aac68c74c19a3
|
|
|
|
Stop PHP 8.1 issuing deprecation warnings in selectLimit() method.
Fixes #817
|
|
Cherry-picked from f79488b72345b53b6bb184bfc3985df7604769fe
Fixes #820
# Conflicts:
# drivers/adodb-mysqli.inc.php
|
|
- New private method getBindParamWithType() to remove code duplication
when generating the bind param type string
- Remove unnecessary variables
|
|
|
|
|
|
Introduction of true binding in v5.22.0 broke bulk binding.
This restores the bulkbind feature to the mysqli driver and adds a
performance feature where the typestring can be pre-defined.
Fixes #806
|
|
|
|
Problem was caused by calling strtolower() in the $rowTransform closure.
Case conversion now takes ADODB_ASSOC_CASE into account.
Fixes #813
|
|
Fixes #808
|
|
- Remove code duplication
- Remove unnecessary "PHP5 compat hack"
- Fix #812: PHP notice when $iarr parameter is provided but not expected
by SQL statement
- Coding guidelines
|
|
|
|
|
|
Executing a SELECT statement against a table containing a null BLOB
triggered deprecation warnings in PHP 8.1.
_blobDecode() now returns empty string when $blob parameter is null.
Fixes #811
|
|
These legacy drivers are all based on the old mysql extension, which was
deprecated in PHP 5.5 and removed in PHP 7.0.
Fixes #804
|
|
Restore ability to set the same parameter multiple times (see #187),
that was removed in 5.21.1 [1].
Fixes #803
[1]: commits aa208834198c4cf88a5b7c2c4e71029a1f709c4d and
27ec62293ae0397c8f253795a591a6d61da88294
|
|
|
|
# Conflicts:
# adodb.inc.php
# docs/changelog.md
|
|
|
|
Referencing mssqlnative in the mysqli driver does not make sense.
Moreover the tag is not well formed and causes phpDocumentor to throw an
alert.
|
|
This allows Oracle users to avoid reaching the maximum open cursors
limit by releasing the statement resource allocated by oci_parse(), and
prevent occurrence of an ORA-01000 error.
The resource is cleared (set to null) after freeing statement, to avoid
keeping a resource of type Unknown in the statement.
Fixes #770
|
|
Remove old, commented-out code
|
|
Thanks to Emmet Leahy of Sorcery Ltd for reporting this vulnerability
(CVE-2021-3850).
Refactoring ADODB_postgres64::_connect():
- Remove adodb_addslashes() function, which did not escape the
connection parameters when they are wrapped in single quotes
(root cause for the identified security issue).
- Use addcslashes() instead of addslashes() to only escape `'` and `\`,
to strictly follow pg_connect() documentation (addslashes() also
escapes `"`)
- Use an array and a foreach loop to build the connection string when
given individual parameters for host:port, user, password and dbname
Fixes #793
|
|
|
|
Use of $php_errormsg has been deprecated since PHP7.2 and removed in PHP 8. The driver now uses the db2_stmt_error() function to retrieve the last error instead of relying on the assigned $php_errormsg value. Warnings from ADOdb also no longer assign the value.
|
|
It is declared in ADOConnection since e3fa991cab89ceb9724bf8c19676a450ee62a1f8.
Convert ADOConnection::$dsnType comment to PHPDoc.
Issue #789
|
|
Adding UUID, NUMERIC, DECIMAL, FLOAT4 and FLOAT8.
Fixes #782
|
|
Following up on #767, per @Unifex's suggestion [1], removing _fixblobs()
and moving its code into new _prepFields() function.
Additional changes:
- add PHPDoc block
- protected attribute
- remove return type - not really useful as in most cases success is
evaluated by checking $this->fields !== false
- fixed a couple remaining occurrences of is_array() checks
- coding guidelines
[1]: https://github.com/ADOdb/ADOdb/pull/760#issuecomment-961564909
|
|
The call to pg_fetch_array() returns false in all cases where we would
not need or want to potentially _fixblobs() and return true. A straight
up boolean check is all that is needed here, no need for in_array().
Tracking through _fixblobs() is called in a number of places and how its
result is checked was repeated in every case. The checks were moved into
the function, which was updated to return a boolean should we want to
check that.
It was also noted that in every case the setting of $this->fields was
identical as well so new _prepfields() method was added which sets
$this->fields and calls _fixblobs().
All instances of _fixblobs() were replaced with _prepfields() and the
pg_fetch_array() call deleted.
Fixes #767 (replacing #760)
|
|
|
|
- public visibility
- camelCase
- change $owner default from false to ''
- add $associative param where missing
- PHPDoc updates
|
|
|
|
Method is not used anywhere.
|
|
Fixes #769
|
|
We are not executing prepared statements with parameters here, so using
pg_execute() (which expects a 3rd parameter) is not necessary.
In fact, these used to be pg_exec() calls, which were incorrectly
replaced by pg_execute() instead of pg_query() in commit
2223c2a1fe8ecf5b2fc07f503a280d080596dd94.
Fixes #768
|
|
|
|
# Conflicts:
# drivers/adodb-mysqli.inc.php
|
|
PHP 8.1 changes the default error reporting mode from OFF to
MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT [1].
We manually set it to MYSQLI_REPORT_OFF in the ADODB_mysqli class
constructor to ensure compatibility.
Fixes #755
[1]: https://wiki.php.net/rfc/mysqli_default_errmode
|