Following error is thrown after upgrading from Drupal 8.7 to Drupal 9.4, and PHP 7.2 to PHP 8.1:
Deprecated function: addcslashes(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\Core\Database\Connection->escapeLike() (line 1525 of core/lib/Drupal/Core/Database/Connection.php).
Drupal\Core\Database\Connection->escapeLike(NULL) (Line: 420) Drupal\Core\Database\Query\Select->escapeLike(NULL) (Line: 118) Drupal\Core\Entity\Query\Sql\Condition::translateCondition(Array, Object, ) (Line: 63) Drupal\ultimate_cron\Entity\CronJob->invokeCallback() (Line: 471) Drupal\Core\DrupalKernel->handle(Object) (Line: 21)
I have already tried the steps mentioned in below URL but the error still occurs: