summaryrefslogtreecommitdiff
path: root/adodb-perf.inc.php
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 /adodb-perf.inc.php
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
Diffstat (limited to 'adodb-perf.inc.php')
-rw-r--r--adodb-perf.inc.php12
1 files changed, 6 insertions, 6 deletions
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