From ad06af09245b9c9ed3256b1fb0cf4429e6bf90e5 Mon Sep 17 00:00:00 2001 From: chansizzle <14916599+chansizzle@users.noreply.github.com> Date: Fri, 13 Sep 2019 14:29:31 -0600 Subject: [PATCH] Update functions.php (#4607) removing potential for "Warning: sizeof(): Parameter must be an array or an object that implements Countable" --- resources/functions.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/resources/functions.php b/resources/functions.php index 23f9ce821e..c0425de69e 100644 --- a/resources/functions.php +++ b/resources/functions.php @@ -1571,8 +1571,10 @@ function number_pad($number,$n) { case 'up': $direction = 'keyup'; break; } //check for element exceptions - if (sizeof($exceptions) > 0) { - $exceptions = "!$(e.target).is('".implode(',', $exceptions)."') && "; + if (is_array($exceptions)) { + if (sizeof($exceptions) > 0) { + $exceptions = "!$(e.target).is('".implode(',', $exceptions)."') && "; + } } //quote if selector is id or class $subject = ($subject != 'window' && $subject != 'document') ? "'".$subject."'" : $subject;