Update functions.php (#4607)

removing potential for "Warning: sizeof(): Parameter must be an array or an object that implements Countable"
This commit is contained in:
chansizzle 2019-09-13 14:29:31 -06:00 committed by FusionPBX
parent 378d6b2481
commit ad06af0924
1 changed files with 4 additions and 2 deletions

View File

@ -1571,8 +1571,10 @@ function number_pad($number,$n) {
case 'up': $direction = 'keyup'; break; case 'up': $direction = 'keyup'; break;
} }
//check for element exceptions //check for element exceptions
if (sizeof($exceptions) > 0) { if (is_array($exceptions)) {
$exceptions = "!$(e.target).is('".implode(',', $exceptions)."') && "; if (sizeof($exceptions) > 0) {
$exceptions = "!$(e.target).is('".implode(',', $exceptions)."') && ";
}
} }
//quote if selector is id or class //quote if selector is id or class
$subject = ($subject != 'window' && $subject != 'document') ? "'".$subject."'" : $subject; $subject = ($subject != 'window' && $subject != 'document') ? "'".$subject."'" : $subject;