[TikiWiki-commits] [Git][tikiwiki/tiki][28.x] [FIX] ODBC: check for existing results in a more safe way that works with...
"Victor Emanouilov \(@kroky\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <693ffd12ccfa2_2a17f7dc-36@gitlab-sidekiq-low-urgency-cpu-bound-v2-55c9b978c9-r4d8z.mail> |
Victor Emanouilov pushed to branch 28.x at Tiki Wiki CMS Groupware / Tiki
Commits:
39e12442 by Victor Emanouilov at 2025-12-15T14:20:30+02:00
[FIX] ODBC: check for existing results in a more safe way that works with broader range of odbc drivers and backends
- - - - -
1 changed file:
- lib/core/Tracker/Tabular/ODBCManager.php
Changes:
=====================================
lib/core/Tracker/Tabular/ODBCManager.php
=====================================
@@ -120,7 +120,7 @@ class ODBCManager
$sql = "SELECT \"{$pk}\" FROM {$this->config['table']} WHERE \"{$pk}\" = ?";
$rs = odbc_prepare($conn, $sql);
odbc_execute($rs, [$id]);
- $exists = odbc_num_rows($rs) > 0;
+ $exists = odbc_fetch_array($rs) ? true : false;
} else {
$exists = false;
$id = null;
@@ -291,7 +291,7 @@ class ODBCManager
$rs = odbc_prepare($conn, $sql);
if ($rs) {
odbc_execute($rs, [$value]);
- $exists = odbc_num_rows($rs) > 0;
+ $exists = odbc_fetch_array($rs) ? true : false;
} else {
$exists = false;
}
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/39e12442352d29ee62c7a680d7684017b2d49840
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/39e12442352d29ee62c7a680d7684017b2d49840
You're receiving this email because of your account on gitlab.com.
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs