grantus
Active member
I'm trying to delete a row:
And I'm calling it in another method like this:
But I'm getting this error:
It keeps pointing to this line:
The upload_id column is an integer, of course, but I got the same error even when testing on a string column.
Why do I keep getting the array to string error?
Code:
private static function deletePending($table, $upload_id) {
$db = \XF::db();
$rowsDeleted = $db->delete($table, [
'upload_id' => $upload_id
]);
}
And I'm calling it in another method like this:
Code:
self::deletePending('xf_ill_bfights_uploads', $row['upload_id']);
But I'm getting this error:
Code:
ErrorException: [E_WARNING] Array to string conversion
It keeps pointing to this line:
Code:
'upload_id' => $upload_id
The upload_id column is an integer, of course, but I got the same error even when testing on a string column.
Why do I keep getting the array to string error?