summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Regad <dregad@mantisbt.org>2025-10-25 01:12:07 +0200
committerDamien Regad <dregad@mantisbt.org>2025-10-25 01:12:07 +0200
commit481bb5292033af2918bea9a9af4b551781d17f5f (patch)
treeae01b368c98ec0061b5937884f8ce696de133551
parent4cacd51045237191d07f98aa4d85f35647fc92e1 (diff)
downloadadodb-481bb5292033af2918bea9a9af4b551781d17f5f.tar.gz
adodb-481bb5292033af2918bea9a9af4b551781d17f5f.tar.bz2
adodb-481bb5292033af2918bea9a9af4b551781d17f5f.zip
PHP 8.5: fix Non-canonical cast deprecations
Non-canonical cast (integer) is deprecated, use the (int) cast instead Global search and replace throughout the code base. Fixes #1143
-rw-r--r--adodb-csvlib.inc.php4
-rw-r--r--adodb-error.inc.php2
-rw-r--r--adodb-lib.inc.php2
-rw-r--r--adodb-pager.inc.php2
-rw-r--r--adodb-perf.inc.php12
-rw-r--r--adodb-time.inc.php4
-rw-r--r--adodb.inc.php6
-rw-r--r--drivers/adodb-ado.inc.php2
-rw-r--r--drivers/adodb-ado5.inc.php2
-rw-r--r--drivers/adodb-ads.inc.php2
-rw-r--r--drivers/adodb-csv.inc.php4
-rw-r--r--drivers/adodb-db2.inc.php10
-rw-r--r--drivers/adodb-db2oci.inc.php2
-rw-r--r--drivers/adodb-db2ora.inc.php2
-rw-r--r--drivers/adodb-firebird.inc.php8
-rw-r--r--drivers/adodb-ibase.inc.php4
-rw-r--r--drivers/adodb-ldap.inc.php10
-rw-r--r--drivers/adodb-odbc.inc.php2
-rw-r--r--drivers/adodb-odbc_db2.inc.php2
-rw-r--r--drivers/adodb-pdo.inc.php6
-rw-r--r--drivers/adodb-pdo_dblib.inc.php2
-rw-r--r--drivers/adodb-pdo_firebird.inc.php6
-rw-r--r--drivers/adodb-postgres7.inc.php4
-rw-r--r--drivers/adodb-sqlanywhere.inc.php4
-rw-r--r--drivers/adodb-sybase.inc.php4
-rw-r--r--drivers/adodb-text.inc.php2
26 files changed, 55 insertions, 55 deletions
diff --git a/adodb-csvlib.inc.php b/adodb-csvlib.inc.php
index 87efd940..17db6cac 100644
--- a/adodb-csvlib.inc.php
+++ b/adodb-csvlib.inc.php
@@ -142,7 +142,7 @@ $ADODB_INCLUDED_CSV = 1;
$rs->EOF = true;
$rs->_numOfFields = 0;
$rs->sql = urldecode($meta[2]);
- $rs->affectedrows = (integer)$meta[3];
+ $rs->affectedrows = (int)$meta[3];
$rs->insertid = $meta[4];
return $rs;
}
@@ -156,7 +156,7 @@ $ADODB_INCLUDED_CSV = 1;
# +0 sec after timeout, give processes 100% chance of timing out
if (sizeof($meta) > 1) {
if($timeout >0){
- $tdiff = (integer)( $meta[1]+$timeout - time());
+ $tdiff = (int)( $meta[1]+$timeout - time());
if ($tdiff <= 2) {
switch($tdiff) {
case 4:
diff --git a/adodb-error.inc.php b/adodb-error.inc.php
index 517cf9b0..bc621b51 100644
--- a/adodb-error.inc.php
+++ b/adodb-error.inc.php
@@ -107,7 +107,7 @@ function adodb_error($provider,$dbType,$errno)
function adodb_error_pg($errormsg)
{
- if (is_numeric($errormsg)) return (integer) $errormsg;
+ if (is_numeric($errormsg)) return (int) $errormsg;
// Postgres has no lock-wait timeout. The best we could do would be to set a statement timeout.
static $error_regexps = array(
'(Table does not exist\.|Relation [\"\'].*[\"\'] does not exist|sequence does not exist|class ".+" not found)$' => DB_ERROR_NOSUCHTABLE,
diff --git a/adodb-lib.inc.php b/adodb-lib.inc.php
index 46fa5ddf..c2089e00 100644
--- a/adodb-lib.inc.php
+++ b/adodb-lib.inc.php
@@ -1158,7 +1158,7 @@ function _adodb_column_sql(&$zthis, $action, $type, $fname, $fnameq, $arrFields,
case "I":
case "R":
$val = $arrFields[$fname];
- if (!is_numeric($val)) $val = (integer) $val;
+ if (!is_numeric($val)) $val = (int) $val;
break;
default:
diff --git a/adodb-pager.inc.php b/adodb-pager.inc.php
index cfe981d3..122641ed 100644
--- a/adodb-pager.inc.php
+++ b/adodb-pager.inc.php
@@ -68,7 +68,7 @@ class ADODB_Pager {
$next_page = $id.'_next_page';
if (isset($_GET[$next_page])) {
- $_SESSION[$curr_page] = (integer) $_GET[$next_page];
+ $_SESSION[$curr_page] = (int) $_GET[$next_page];
}
if (empty($_SESSION[$curr_page])) $_SESSION[$curr_page] = 1; ## at first page
diff --git a/adodb-perf.inc.php b/adodb-perf.inc.php
index 91610536..0b59cf7d 100644
--- a/adodb-perf.inc.php
+++ b/adodb-perf.inc.php
@@ -33,7 +33,7 @@ $ADODB_PERF_MIN = 0.05; // log only if >= minimum number of secs to run
function adodb_getmem()
{
if (function_exists('memory_get_usage'))
- return (integer) ((memory_get_usage()+512)/1024);
+ return (int) ((memory_get_usage()+512)/1024);
$pid = getmypid();
@@ -49,7 +49,7 @@ function adodb_getmem()
if (sizeof($output) == 0) return 0;
$memarr = explode(' ',$output[0]);
- if (sizeof($memarr)>=2) return (integer) $memarr[1];
+ if (sizeof($memarr)>=2) return (int) $memarr[1];
return 0;
}
@@ -361,7 +361,7 @@ Committed_AS: 348732 kB
if (!$info) return false;
if (strncmp(PHP_OS,'WIN',3)==0) {
- return (integer) $info[0];
+ return (int) $info[0];
}else {
if (empty($this->_lastLoad)) {
sleep(1);
@@ -601,7 +601,7 @@ Committed_AS: 348732 kB
$arr[0] = (float)$this->DBParameter('data cache hit ratio');
$arr[1] = (float)$this->DBParameter('data reads');
$arr[2] = (float)$this->DBParameter('data writes');
- $arr[3] = (integer) $this->DBParameter('current connections');
+ $arr[3] = (int) $this->DBParameter('current connections');
return $arr;
}
@@ -707,7 +707,7 @@ Committed_AS: 348732 kB
else $do = 'stats';
if (isset($_GET['nsql'])) {
- if ($_GET['nsql'] > 0) $nsql = $_SESSION['ADODB_PERF_SQL'] = (integer) $_GET['nsql'];
+ if ($_GET['nsql'] > 0) $nsql = $_SESSION['ADODB_PERF_SQL'] = (int) $_GET['nsql'];
}
echo "<title>ADOdb Performance Monitor on $app</title><body bgcolor=white>";
if ($do == 'viewsql') $form = "<td><form># SQL:<input type=hidden value=viewsql name=do> <input type=text size=4 name=nsql value=$nsql><input type=submit value=Go></td></form>";
@@ -976,7 +976,7 @@ Committed_AS: 348732 kB
rs2html($rs);
}
} else {
- $e1 = (integer) $this->conn->ErrorNo();
+ $e1 = (int) $this->conn->ErrorNo();
$e2 = $this->conn->ErrorMsg();
if (($e1) || ($e2)) {
if (empty($e1)) $e1 = '-1'; // postgresql fix
diff --git a/adodb-time.inc.php b/adodb-time.inc.php
index 0c3dd11d..95911766 100644
--- a/adodb-time.inc.php
+++ b/adodb-time.inc.php
@@ -687,8 +687,8 @@ function adodb_year_digit_check($y)
{
if ($y < 100) {
- $yr = (integer) date("Y");
- $century = (integer) ($yr /100);
+ $yr = (int) date("Y");
+ $century = (int) ($yr /100);
if ($yr%100 > 50) {
$c1 = $century + 1;
diff --git a/adodb.inc.php b/adodb.inc.php
index de73084e..f995eeb0 100644
--- a/adodb.inc.php
+++ b/adodb.inc.php
@@ -2176,7 +2176,7 @@ if (!defined('_ADODB_LAYER')) {
return false;
}
- $midrow = (integer) ($total/2);
+ $midrow = (int) ($total/2);
$rs = $this->SelectLimit("select $field from $table $where order by 1",1,$midrow);
if ($rs && !$rs->EOF) {
return reset($rs->fields);
@@ -5701,10 +5701,10 @@ class ADORecordSet implements IteratorAggregate {
$nconnect = true; $persist = true; break;
case 'persist':
case 'persistent': $persist = $v; break;
- case 'debug': $obj->debug = (integer) $v; break;
+ case 'debug': $obj->debug = (int) $v; break;
#ibase
case 'role': $obj->role = $v; break;
- case 'dialect': $obj->dialect = (integer) $v; break;
+ case 'dialect': $obj->dialect = (int) $v; break;
case 'charset': $obj->charset = $v; $obj->charSet=$v; break;
case 'buffers': $obj->buffers = $v; break;
case 'fetchmode': $obj->SetFetchMode($v); break;
diff --git a/drivers/adodb-ado.inc.php b/drivers/adodb-ado.inc.php
index df95c690..b0979ff5 100644
--- a/drivers/adodb-ado.inc.php
+++ b/drivers/adodb-ado.inc.php
@@ -407,7 +407,7 @@ class ADORecordSet_ado extends ADORecordSet {
// $rs->AbsolutePosition->$row-2;
// return true;
if ($this->_currentRow > $row) return false;
- @$rs->Move((integer)$row - $this->_currentRow-1); //adBookmarkFirst
+ @$rs->Move((int)$row - $this->_currentRow-1); //adBookmarkFirst
return true;
}
diff --git a/drivers/adodb-ado5.inc.php b/drivers/adodb-ado5.inc.php
index 04b45abf..e4fa0cfe 100644
--- a/drivers/adodb-ado5.inc.php
+++ b/drivers/adodb-ado5.inc.php
@@ -451,7 +451,7 @@ class ADORecordSet_ado extends ADORecordSet {
// $rs->AbsolutePosition->$row-2;
// return true;
if ($this->_currentRow > $row) return false;
- @$rs->Move((integer)$row - $this->_currentRow-1); //adBookmarkFirst
+ @$rs->Move((int)$row - $this->_currentRow-1); //adBookmarkFirst
return true;
}
diff --git a/drivers/adodb-ads.inc.php b/drivers/adodb-ads.inc.php
index 16eec976..436a2d62 100644
--- a/drivers/adodb-ads.inc.php
+++ b/drivers/adodb-ads.inc.php
@@ -371,7 +371,7 @@ class ADODB_ads extends ADOConnection
*/
function ODBCTypes($t)
{
- switch ((integer)$t) {
+ switch ((int)$t) {
case 1:
case 12:
case 0:
diff --git a/drivers/adodb-csv.inc.php b/drivers/adodb-csv.inc.php
index e6694d9a..8f1a7dd6 100644
--- a/drivers/adodb-csv.inc.php
+++ b/drivers/adodb-csv.inc.php
@@ -103,7 +103,7 @@ class ADODB_csv extends ADOConnection {
$at = strpos($err,'::::');
if ($at === false) {
$this->_errorMsg = $err;
- $this->_errorNo = (integer)$err;
+ $this->_errorNo = (int)$err;
} else {
$this->_errorMsg = substr($err,$at+4,1024);
$this->_errorNo = -9999;
@@ -159,7 +159,7 @@ class ADODB_csv extends ADOConnection {
$at = strpos($err,'::::');
if ($at === false) {
$this->_errorMsg = $err;
- $this->_errorNo = (integer)$err;
+ $this->_errorNo = (int)$err;
} else {
$this->_errorMsg = substr($err,$at+4,1024);
$this->_errorNo = -9999;
diff --git a/drivers/adodb-db2.inc.php b/drivers/adodb-db2.inc.php
index 60cd093a..77466db1 100644
--- a/drivers/adodb-db2.inc.php
+++ b/drivers/adodb-db2.inc.php
@@ -179,7 +179,7 @@ class ADODB_db2 extends ADOConnection {
$db2Options);
}
else
-
+
$this->_connectionID = $db2Function($argDSN,
'',
'',
@@ -193,7 +193,7 @@ class ADODB_db2 extends ADOConnection {
if ($this->_connectionID && $argDatabasename)
$this->execute("SET SCHEMA=$argDatabasename");
-
+
return $this->_connectionID != false;
}
@@ -228,7 +228,7 @@ class ADODB_db2 extends ADOConnection {
$connectionParameters['dsn'] = $argDSN;
$connectionParameters['database'] = $argDatabasename;
$connectionParameters['catalogue'] = false;
-
+
return $connectionParameters;
}
@@ -537,7 +537,7 @@ class ADODB_db2 extends ADOConnection {
function selectLimit($sql,$nrows=-1,$offset=-1,$inputArr=false,$secs2cache=0)
{
- $nrows = (integer) $nrows;
+ $nrows = (int) $nrows;
if ($offset <= 0)
{
@@ -1059,7 +1059,7 @@ See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/db2/htm/db2
*/
function DB2Types($t)
{
- switch ((integer)$t) {
+ switch ((int)$t) {
case 1:
case 12:
case 0:
diff --git a/drivers/adodb-db2oci.inc.php b/drivers/adodb-db2oci.inc.php
index eea63d94..4e98d141 100644
--- a/drivers/adodb-db2oci.inc.php
+++ b/drivers/adodb-db2oci.inc.php
@@ -101,7 +101,7 @@ function _colonparser($sql,$arr)
$ch2 = $at < $lensql ? $sql[$at] : '';
} while ('0' <= $ch && $ch <= '9');
#echo "$n $arrsize ] ";
- $n = (integer) $n;
+ $n = (int) $n;
if ($n < $arrsize) {
$sql2 .= substr($sql,$nprev,$nat-$nprev-1).'?';
$nprev = $at-1;
diff --git a/drivers/adodb-db2ora.inc.php b/drivers/adodb-db2ora.inc.php
index d343a8ae..71b21e90 100644
--- a/drivers/adodb-db2ora.inc.php
+++ b/drivers/adodb-db2ora.inc.php
@@ -41,7 +41,7 @@ define('ADODB_DB2OCI',1);
function _colontrack($p)
{
global $_COLONARR, $_COLONSZ;
- $v = (integer) substr($p[1], 1);
+ $v = (int) substr($p[1], 1);
if ($v > $_COLONSZ) return $p[1];
$_COLONARR[] = $v;
return '?';
diff --git a/drivers/adodb-firebird.inc.php b/drivers/adodb-firebird.inc.php
index db3cca5d..52d751d8 100644
--- a/drivers/adodb-firebird.inc.php
+++ b/drivers/adodb-firebird.inc.php
@@ -427,7 +427,7 @@ class ADODB_firebird extends ADOConnection {
$rs = $this->Execute($getnext);
}
if ($rs && !$rs->EOF) {
- $this->genID = (integer) reset($rs->fields);
+ $this->genID = (int) reset($rs->fields);
}
else {
$this->genID = 0; // false
@@ -454,7 +454,7 @@ class ADODB_firebird extends ADOConnection {
public function errorNo()
{
- return (integer) $this->_errorCode;
+ return (int) $this->_errorCode;
}
function errorMsg()
@@ -989,8 +989,8 @@ class ADODB_firebird extends ADOConnection {
*/
public function selectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false, $secs2cache=0)
{
- $nrows = (integer) $nrows;
- $offset = (integer) $offset;
+ $nrows = (int) $nrows;
+ $offset = (int) $offset;
$str = 'SELECT ';
if ($nrows >= 0) $str .= "FIRST $nrows ";
$str .=($offset>=0) ? "SKIP $offset " : '';
diff --git a/drivers/adodb-ibase.inc.php b/drivers/adodb-ibase.inc.php
index 8159c512..7a37976b 100644
--- a/drivers/adodb-ibase.inc.php
+++ b/drivers/adodb-ibase.inc.php
@@ -289,7 +289,7 @@ class ADODB_ibase extends ADOConnection {
$rs = $this->Execute($getnext);
}
if ($rs && !$rs->EOF) {
- $this->genID = (integer) reset($rs->fields);
+ $this->genID = (int) reset($rs->fields);
}
else {
$this->genID = 0; // false
@@ -314,7 +314,7 @@ class ADODB_ibase extends ADOConnection {
function ErrorNo()
{
- if (preg_match('/error code = ([\-0-9]*)/i', $this->_errorMsg,$arr)) return (integer) $arr[1];
+ if (preg_match('/error code = ([\-0-9]*)/i', $this->_errorMsg,$arr)) return (int) $arr[1];
else return 0;
}
diff --git a/drivers/adodb-ldap.inc.php b/drivers/adodb-ldap.inc.php
index e1cba330..55d4334a 100644
--- a/drivers/adodb-ldap.inc.php
+++ b/drivers/adodb-ldap.inc.php
@@ -101,11 +101,11 @@ class ADODB_ldap extends ADOConnection {
/*
Valid Domain Values for LDAP Options:
- LDAP_OPT_DEREF (integer)
- LDAP_OPT_SIZELIMIT (integer)
- LDAP_OPT_TIMELIMIT (integer)
- LDAP_OPT_PROTOCOL_VERSION (integer)
- LDAP_OPT_ERROR_NUMBER (integer)
+ LDAP_OPT_DEREF (int)
+ LDAP_OPT_SIZELIMIT (int)
+ LDAP_OPT_TIMELIMIT (int)
+ LDAP_OPT_PROTOCOL_VERSION (int)
+ LDAP_OPT_ERROR_NUMBER (int)
LDAP_OPT_REFERRALS (boolean)
LDAP_OPT_RESTART (boolean)
LDAP_OPT_HOST_NAME (string)
diff --git a/drivers/adodb-odbc.inc.php b/drivers/adodb-odbc.inc.php
index 56db8b0e..13184d07 100644
--- a/drivers/adodb-odbc.inc.php
+++ b/drivers/adodb-odbc.inc.php
@@ -355,7 +355,7 @@ See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/od
*/
function ODBCTypes($t)
{
- switch ((integer)$t) {
+ switch ((int)$t) {
case 1:
case 12:
case 0:
diff --git a/drivers/adodb-odbc_db2.inc.php b/drivers/adodb-odbc_db2.inc.php
index 8f0e60cb..a3ac67ed 100644
--- a/drivers/adodb-odbc_db2.inc.php
+++ b/drivers/adodb-odbc_db2.inc.php
@@ -212,7 +212,7 @@ class ADODB_ODBC_DB2 extends ADODB_odbc {
function SelectLimit($sql, $nrows = -1, $offset = -1, $inputArr = false, $secs2cache = 0)
{
- $nrows = (integer) $nrows;
+ $nrows = (int) $nrows;
if ($offset <= 0) {
// could also use " OPTIMIZE FOR $nrows ROWS "
if ($nrows >= 0) $sql .= " FETCH FIRST $nrows ROWS ONLY ";
diff --git a/drivers/adodb-pdo.inc.php b/drivers/adodb-pdo.inc.php
index d3ce12d0..d254895e 100644
--- a/drivers/adodb-pdo.inc.php
+++ b/drivers/adodb-pdo.inc.php
@@ -404,7 +404,7 @@ class ADODB_pdo extends ADOConnection {
if (sizeof($arr)<2) {
return '';
}
- if ((integer)$arr[0]) {
+ if ((int)$arr[0]) {
return $arr[2];
}
else {
@@ -616,7 +616,7 @@ class ADODB_pdo extends ADOConnection {
if ($stmt) {
$arr = $stmt->errorinfo();
- if ((integer)$arr[1]) {
+ if ((int)$arr[1]) {
$this->_errormsg = $arr[2];
$this->_errorno = $arr[1];
}
@@ -752,7 +752,7 @@ class ADOPDOStatement {
}
if (is_array($arr)) {
- if ((integer) $arr[0] && isset($arr[2])) {
+ if ((int) $arr[0] && isset($arr[2])) {
return $arr[2];
}
else {
diff --git a/drivers/adodb-pdo_dblib.inc.php b/drivers/adodb-pdo_dblib.inc.php
index aae561bf..fa217af0 100644
--- a/drivers/adodb-pdo_dblib.inc.php
+++ b/drivers/adodb-pdo_dblib.inc.php
@@ -163,7 +163,7 @@ class ADODB_pdo_dblib extends ADODB_pdo
if ($stmt) {
$arr = $stmt->errorinfo();
- if ((integer)$arr[1]) {
+ if ((int)$arr[1]) {
$this->_errormsg = $arr[2];
$this->_errorno = $arr[1];
}
diff --git a/drivers/adodb-pdo_firebird.inc.php b/drivers/adodb-pdo_firebird.inc.php
index 1ccbf01c..4671b396 100644
--- a/drivers/adodb-pdo_firebird.inc.php
+++ b/drivers/adodb-pdo_firebird.inc.php
@@ -245,7 +245,7 @@ class ADODB_pdo_firebird extends ADODB_pdo_base
$rs = $this->execute($getnext);
}
if ($rs && !$rs->EOF) {
- $this->genID = (integer)reset($rs->fields);
+ $this->genID = (int)reset($rs->fields);
} else {
$this->genID = 0; // false
}
@@ -259,8 +259,8 @@ class ADODB_pdo_firebird extends ADODB_pdo_base
public function selectLimit($sql, $nrows = -1, $offset = -1, $inputarr = false, $secs = 0)
{
- $nrows = (integer)$nrows;
- $offset = (integer)$offset;
+ $nrows = (int)$nrows;
+ $offset = (int)$offset;
$str = 'SELECT ';
if ($nrows >= 0) {
$str .= "FIRST $nrows ";
diff --git a/drivers/adodb-postgres7.inc.php b/drivers/adodb-postgres7.inc.php
index b5e63acf..9559eb00 100644
--- a/drivers/adodb-postgres7.inc.php
+++ b/drivers/adodb-postgres7.inc.php
@@ -117,8 +117,8 @@ class ADODB_postgres7 extends ADODB_postgres64 {
{
$nrows = (int) $nrows;
$offset = (int) $offset;
- $offsetStr = ($offset >= 0) ? " OFFSET ".((integer)$offset) : '';
- $limitStr = ($nrows >= 0) ? " LIMIT ".((integer)$nrows) : '';
+ $offsetStr = ($offset >= 0) ? " OFFSET ".((int)$offset) : '';
+ $limitStr = ($nrows >= 0) ? " LIMIT ".((int)$nrows) : '';
if ($secs2cache)
$rs = $this->CacheExecute($secs2cache,$sql."$limitStr$offsetStr",$inputarr);
else
diff --git a/drivers/adodb-sqlanywhere.inc.php b/drivers/adodb-sqlanywhere.inc.php
index 8d909fde..3bbf6155 100644
--- a/drivers/adodb-sqlanywhere.inc.php
+++ b/drivers/adodb-sqlanywhere.inc.php
@@ -55,7 +55,7 @@ if (!defined('ADODB_SYBASE_SQLANYWHERE')){
$fd = fopen ($filename, "rb");
- $integer_chunks = (integer)filesize($filename) / $chunk_size;
+ $integer_chunks = (int)filesize($filename) / $chunk_size;
$modulus = filesize($filename) % $chunk_size;
if ($modulus != 0){
$integer_chunks += 1;
@@ -83,7 +83,7 @@ if (!defined('ADODB_SYBASE_SQLANYWHERE')){
function load_blobvar_from_var($blobVarName, &$varName) {
$chunk_size = 1000;
- $integer_chunks = (integer)strlen($varName) / $chunk_size;
+ $integer_chunks = (int)strlen($varName) / $chunk_size;
$modulus = strlen($varName) % $chunk_size;
if ($modulus != 0){
$integer_chunks += 1;
diff --git a/drivers/adodb-sybase.inc.php b/drivers/adodb-sybase.inc.php
index 79fb82e8..699025f2 100644
--- a/drivers/adodb-sybase.inc.php
+++ b/drivers/adodb-sybase.inc.php
@@ -188,8 +188,8 @@ class ADODB_sybase extends ADOConnection {
return $rs;
}
- $nrows = (integer) $nrows;
- $offset = (integer) $offset;
+ $nrows = (int) $nrows;
+ $offset = (int) $offset;
$cnt = ($nrows >= 0) ? $nrows : 999999999;
if ($offset > 0 && $cnt) $cnt += $offset;
diff --git a/drivers/adodb-text.inc.php b/drivers/adodb-text.inc.php
index 36a1a0d4..afdfe71d 100644
--- a/drivers/adodb-text.inc.php
+++ b/drivers/adodb-text.inc.php
@@ -257,7 +257,7 @@ class ADODB_text extends ADOConnection {
preg_match("/$eregword/",$orderby,$arr);
if (sizeof($arr) < 2) return $this; // actually invalid sql
$col = $arr[1];
- $at = (integer) $col;
+ $at = (int) $col;
if ($at == 0) {
$i = 0;
reset($projnames);