Updated my app from PHP 5.6 to 7.2 and noticed an error

Please report bugs and any annoyances here. Kindly include all possible details: steps to reproduce, expected result, actual result, screenshots, ... etc.
Post Reply
mysh_eireannach
Veteran Member
Posts: 35
Joined: 2016-02-16 22:31

Updated my app from PHP 5.6 to 7.2 and noticed an error

Post by mysh_eireannach » 2019-05-30 07:27

Hi All

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.

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
admin/incFunctions.php line 2487
#########################################################
/**
* @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);
}

Post Reply