]> git.joonet.de Git - adminer.git/commitdiff
Allow null value in where_link()
authorJakub Vrana <jakub@vrana.cz>
Tue, 3 Jun 2025 14:17:55 +0000 (16:17 +0200)
committerJakub Vrana <jakub@vrana.cz>
Tue, 3 Jun 2025 14:17:55 +0000 (16:17 +0200)
adminer/include/functions.inc.php

index 4a3dd50b7360a27699123a5d1a742af6c4ce5b30..d4df33d0d2f40bb2028a439a914a201f491336ad 100644 (file)
@@ -291,7 +291,7 @@ function where_check(string $val, array $fields = array()): string {
 * @param int $i condition order
 * @param string $column column identifier
 */
-function where_link(int $i, string $column, string $value, string $operator = "="): string {
+function where_link(int $i, string $column, ?string $value, string $operator = "="): string {
        return "&where%5B$i%5D%5Bcol%5D=" . urlencode($column) . "&where%5B$i%5D%5Bop%5D=" . urlencode(($value !== null ? $operator : "IS NULL")) . "&where%5B$i%5D%5Bval%5D=" . urlencode($value);
 }