Why do I get this error? What does it mean? [on hold]


In a custom module in Drupal 8, I have this query.

$query = Drupal::database () -> 
update ('webform_submission_data', 'n') ->
fields ('n', array ('value' => 'accepted')) -> 
condition ('sid', 1, '=') -> 
condition ('name', 'registration_status', '=') -> 
execute ();

I get the following error message.

TypeError: Argument 2 passed to DrupalCoreDatabaseConnection::update() must be of the type array, string given, called in …

I cannot understand what argument 2 is and what must be of the type array means.

قالب وردپرس