| Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
The PHP native `$php_errormsg` variable has been deprecated as of PHP
7.2. The recommended replacement is `error_get_last()`.
A number of the driver classes used `$php_errormsg` to track if a DB
action caused an error.
As the `error_get_last()` function returns an array and comparing the
message therefore is slightly more involved, two new methods have been
introduced into the abstract parent class `ADOConnection` to handle the
message comparison.
The `resetLastError()` method retrieves the initial (old) error message
and resets it to enable checking whether a new error has occurred, even
when the new error is the same as the previous one.
The new `getChangedErrorMsg()` method compares the old error message
with the current one to determine whether a new message has occurred,
and if so, returns the message.
Refs:
* http://php.net/manual/en/migration72.deprecated.php#migration72.deprecated.track_errors-and-php_errormsg
* http://php.net/manual/en/reserved.variables.phperrormsg.php
* http://php.net/manual/en/function.error-get-last.php
Additional notes:
* In the `ADODB_ads::UpdateBlob()` method, the original (old) message
was not being retrieved which could result in an unrelated error being
recorded. This has been fixed.
* In the `ADODB_db2::_connect()` and `ADODB_db2::_pconnect()` methods,
the `$php_errormsg` was being reset, but subsequently not checked for
changes, so as the variable in effect was not being used, I've removed
the related code.
* In the `ADODB_sybase::ErrorMsg()` method, the `$php_errormsg` was
being checked, but no functions which could potential cause errors are
being called. As `$php_errormsg` is only available in the scope an
error occurred in, this meant that `$php_errormsg` would always be
empty, so I've removed the related code.
Fixes #409
|
|
|
|
The `SelectLimit` function has a potential SQL injection vulnerability
through the use of the `nrows` and `offset` parameters which are not
forced to integers.
This is a follow-up on #311, and fixes all remaining drivers that do not
use ADOConnection::SelectLimit().
Fixes #401
Signed-off-by: Damien Regad <dregad@mantisbt.org>
Original commits squashed, message reworded. Fixed whitespace.
|
|
Reserved variable $php_errormsg is deprecated in PHP 7.2
http://php.net/manual/en/reserved.variables.phperrormsg.php
Fixes #405
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- running SED script
- manual adjustments for files not processed by regex
|
|
This is the original commit from @valioz, rebased on latest master
Signed-off-by: Damien Regad <dregad@mantisbt.org>
Conflicts:
drivers/adodb-db2ora.inc.php
drivers/adodb-mssqlpo.inc.php
drivers/adodb-odbc_oracle.inc.php
|
|
|
|
Because of the change in default value for the method's parameter, it is
no longer needed to specify the constant when calling GetRowAssoc() in
the individual drivers.
|
|
|
|
|
|
http://php.net/manual/en/language.basic-syntax.phptags.php
|
|
Bumped 'dev' version allows users who rely on source code downloaded
from the git repository rather than an official release tarball to
reliably determine that they are running a development version of the
library.
|
|
- Move all files in adodb5/ to root
- Remove adodb-for-php4/ directory
|