From d32ad04722fe26f39e685489f5cb3f9d8601287d Mon Sep 17 00:00:00 2001 From: troy Date: Fri, 15 Oct 2021 12:21:19 +0200 Subject: [PATCH] sql single hotfix --- sql.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql.php b/sql.php index 851a618..76ad22f 100644 --- a/sql.php +++ b/sql.php @@ -34,7 +34,7 @@ class SQL { '' ), $que ) . "\n" . print_r ( $p, true ) . "\n\n" ); $statement = $this->h->prepare ( $que ); - switch (count ( $p )) { + switch ((is_array ( $p ) ? count ( $p ) : 1)) { case 0 : break; case 1 : @@ -132,7 +132,7 @@ class SQL { ' ', '' ), $que ) . "\n" . print_r ( $p, true ) . "\n\n" ); - switch (count ( $p )) { + switch ((is_array ( $p ) ? count ( $p ) : 1)) { case 0 : break; case 1 :