Problem/Motivation

Recently i keep getting this error ever-since moving to drupal 9.1.x

Fatal error: Uncaught Error: Call to a member function prepare() on null in D:\wamp64\www\workbench\workbench_d9_test1\core\lib\Drupal\Core\Database\StatementWrapper.php:49
Stack trace:
#0 D:\wamp64\www\workbench\workbench_d9_test1\core\lib\Drupal\Core\Database\Connection.php(557): Drupal\Core\Database\StatementWrapper->__construct(Object(Drupal\Core\Database\Driver\mysql\Connection), NULL, 'DELETE FROM "ke...', Array)
#1 D:\wamp64\www\workbench\workbench_d9_test1\core\lib\Drupal\Core\Database\Connection.php(822): Drupal\Core\Database\Connection->prepareStatement('DELETE FROM "ke...', Array)
#2 D:\wamp64\www\workbench\workbench_d9_test1\core\lib\Drupal\Core\Database\Driver\mysql\Connection.php(97): Drupal\Core\Database\Connection->query('DELETE FROM {ke...', Array, Array)
#3 D:\wamp64\www\workbench\workbench_d9_test1\core\lib\Drupal\Core\Database\Query\Delete.php(55): Drupal\Core\Database\Driver\mysql\Connection->query('DELETE FROM {ke...', Array, Array)
#4 D:\wamp64\www\workbench\workbench_d9_test1\core\lib\Drupal\Core\K in D:\wamp64\www\workbench\workbench_d9_test1\core\lib\Drupal\Core\Database\StatementWrapper.php on line 49

Steps to reproduce

install the business rules module.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

bmustafa created an issue. See original summary.

cilefen’s picture

Status: Active » Postponed (maintainer needs more info)
Issue tags: +Needs steps to reproduce

Hello,

This needs steps to reproduce to be considered a Drupal Core bug. If only business_rules module is affected then the issue could be there.

bmustafa’s picture

Greetings,

if you follow the link of the proposed solution - as a potential clue - and take a closer loot at the problem description (i mean the error log extract) that is linked therein

( ! ) Fatal error: Uncaught Error: Call to a member function prepare() on null in D:\wamp64\www\workbench\workbench_d9_test1\core\lib\Drupal\Core\Database\StatementWrapper.php on line 49
( ! ) Error: Call to a member function prepare() on null in D:\wamp64\www\workbench\workbench_d9_test1\core\lib\Drupal\Core\Database\StatementWrapper.php on line 49
Call Stack
#	Time	Memory	Function	Location
1	0.9146	44434200	Drupal\business_rules\Util\BusinessRulesProcessor->__destruct( )	...\BusinessRulesProcessor.php:0
2	0.9146	44434200	Drupal\Core\KeyValueStore\DatabaseStorageExpirable->deleteAll( )	...\BusinessRulesProcessor.php:766
3	0.9147	44435904	Drupal\Core\Database\Query\Delete->execute( )	...\DatabaseStorage.php:241
4	0.9148	44436528	Drupal\Core\Database\Driver\mysql\Connection->query( )	...\Delete.php:55
5	0.9148	44436528	Drupal\Core\Database\Driver\mysql\Connection->query( )	...\Connection.php:88
6	0.9148	44437008	Drupal\Core\Database\Driver\mysql\Connection->prepareStatement( )	...\Connection.php:822
7	0.9148	44437232	Drupal\Core\Database\StatementWrapper->__construct( )	...\Connection.php:557

notice it is a little bit different than description in the head of this issue...
whereas you would spot that this line ...

Drupal\business_rules\Util\BusinessRulesProcessor->__destruct( ) ...\BusinessRulesProcessor.php:0

... does not show up this time ...

i will try to disable business rules modules and confirm here is error still shows at the bottom of every page ...

colan’s picture

bmustafa’s picture

In sequel to #3 ... i have proceeded to disable "business rules" module and confirm the error is gone.

this means that:

bmustafa’s picture

Issue summary: View changes
bmustafa’s picture

Issue summary: View changes
cilefen’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)