Updated my app from PHP 5.6 to 7.2 on server and noticed an error
noticed an error when I try to change the owner of record.
admin/incFunctions.php line 2487
Warning: count(): Parameter must be an array or an object that implements Countable in /home/aaa/public_html/app/admin/incFunctions.php on line 2487
OK
#########################################################
/**
* @brief Inserts a record to the database
*
* @param [in] $tn table name where the record would be inserted
* @param [in] $set_array Assoc array of field names => values to be inserted
* @return boolean indicating success/failure
*/
function insert($tn, $set_array){
$set = prepare_sql_set($set_array);
if(!count($set)) return false;
return sql("INSERT INTO `{$tn}` SET {$set}", $eo);
}