Whwnever I am updating modules I am getting a Failed: PDOException: SQLSTATE[42000] error.
This is the complete error

The following updates returned messages
mailsystem module
Update #7300

    Failed: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '))' at line 1: DELETE FROM {registry} WHERE (name IN ()) ; Array ( ) in mailsystem_update_7300() (line 100 of C:\xampp\htdocs\frfcf\sites\all\modules\mailsystem\mailsystem.install).

Comments

amitkray created an issue. See original summary.

amitkray’s picture

i was able to update that module with some changes to the file mailsystem.install.

I edited the line found near line number 98-100


  db_delete('registry')
    ->condition('name', array_keys($genclasses))
    ->execute();

To

if(count($genclasses)>0){
	  db_delete('registry')
		->condition('name', array_keys($genclasses))
		->execute();
  }

From the error I was able to guess that the array passed $genclasses was an empty array. So I put a check.

amitkray’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.