mirror of
https://github.com/vrana/adminer.git
synced 2026-02-21 05:57:52 +01:00
PostgreSQL: Display all SQL command warnings and only once
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
- Select: Disable Ctrl+click inline edit without UPDATE privilege
|
||||
- Export: Remember unchecked objects (regression from 5.0.6)
|
||||
- PostgreSQL: Order NULL last
|
||||
- PostgreSQL: Display all SQL command warnings and only once
|
||||
|
||||
## Adminer 5.4.2 (released 2026-02-08)
|
||||
- Avoid denial-of-service via version check (GHSA-q4f2-39gr-45jh, regression from 4.6.2)
|
||||
|
||||
@@ -88,7 +88,13 @@ if (isset($_GET["pgsql"])) {
|
||||
}
|
||||
|
||||
function warnings() {
|
||||
return h(pg_last_notice($this->link)); // second parameter is available since PHP 7.1.0
|
||||
if (PHP_VERSION_ID >= 70100) {
|
||||
$return = implode("\n", pg_last_notice($this->link, 2)); // 2 - PGSQL_NOTICE_ALL
|
||||
pg_last_notice($this->link, 3); // 3 - PGSQL_NOTICE_CLEAR
|
||||
} else {
|
||||
$return = pg_last_notice($this->link);
|
||||
}
|
||||
return nl_br(h($return));
|
||||
}
|
||||
|
||||
/** Copy from array into a table
|
||||
|
||||
@@ -22,6 +22,7 @@ parameters:
|
||||
- "~expects bool~" # truthy values
|
||||
- "~fread expects int<1, max>, 100000~" # 1e6
|
||||
- "~'strlen' given~" # used as a bool callback
|
||||
- "~between int<70100~" # PHP_VERSION_ID check
|
||||
|
||||
-
|
||||
message: "~ type specified~" # duplicate functions and methods
|
||||
|
||||
Reference in New Issue
Block a user