By mondrake on
Change record status:
Draft (View all draft change records)
Project:
Introduced in branch:
11.4.x
Introduced in version:
11.4.0
Issue links:
Description:
Usage of TRUNCATE ::execute() method is deprecated: calling code should not rely on its return value. An exception will be thrown starting Drupal 13.
Use the ::executeSafe() method, that is not returning any value.
Before:
public function deleteAll() {
try {
$return = $this->connection->truncate($this->bin)->execute();
}
catch ...
}
After:
public function deleteAll() {
try {
$this->connection->truncate($this->bin)->executeSafe();
}
catch ...
}
Impacts:
Module developers